Linux – How to configure the default email sender properties on a debian server

debianeximlinux

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?

Best Answer

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.