4

How can I configure the default mail sender properties on a debian server (with a mail transport agent of exim4, if it matters)?

Background

I'm running a server (debian 5, the mta is exim4) hosted by rackspace. Rackspace mail uses outgoing sender address authentication, such that I can only send email from vetted "from" addresses.

Sending as, say, a local user results in a rejection:

  SMTP<< 550 5.1.0 <localuser@domainname.com>: 
Sender address rejected: User unknown in relay recipient table
  SMTP<< 554 5.5.1 Error: no valid recipients
  SMTP>> QUIT
LOG: MAIN
  ** webadmin@domainname.com R=smarthost T=remote_smtp_smarthost: 
SMTP error from remote mail server after RCPT TO:<webadmin@domainname.com>:
 host smtp.emailsrvr.com [xxxxxxx]: 550 5.1.0 <localuser@domainname.com>: 
Sender address rejected: User unknown in relay recipient table

Problem is, I'm using a really simple app (logcheck, http://packages.debian.org/unstable/logcheck ) in an attempt to simply email out logs to myself. Logcheck doesn't have any built-in configuration for where the mail get sent from.

So whatever is the default is getting set as, by the system, I need to configure it to make sure it's a vetted address. Where do I start?

coredump
  • 12,713
  • 2
  • 36
  • 56
Kzqai
  • 1,278
  • 4
  • 18
  • 32
  • Part of what ended up causing my problem is that only authorized users are allowed to send out via my rackspace smarthost, so I had to make sure that whoever the default send-out user was, the /etc/email-addresses alias mentioned below by coredump handled that fake user, and re-aliased it to a real user who the smarthost would truly accept. In my case it was being sent out as www-data@mydomain.com because the www-data user was in control of the php scripts that were trying to send email. Alias www-data to webadmin@mydomain.com and they started being delivered. – Kzqai Feb 23 '15 at 03:30

1 Answers1

4

There's a /etc/email-addresses that associates outgoing email addresses with local user accounts (it's part of the default rewrite config of Debian's Exim). I think this is the better solution for your problem.

Also, during a dpkg-reconfigure exim4-config there's an option Hide local mail name in outgoing name, see if it can help you.

coredump
  • 12,713
  • 2
  • 36
  • 56