[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: Exim ignoring aliases, relaying email to incorrect addresses.



Hi Stefhen

On 2005-10-05, Stefhen Hovland <stefhen.hovland@gmail.com> wrote:
> Hi,
>
> I have successfully setup my debian box to send email to my gmail
> account, but it is not expanding aliases correctly, and it is sending
> email to the wrong user@gmail.com.
>
> I would like to have any email sent to just "root" or my local login
> account via cron, logwatch, etc, automatically forwarded to my gmail
> account, but exim is forwarding my email to myself, and then also it
> looks like to root@gmail.com, or hovland@gmail.com, which are my
> unexpanded userid's on my debian box.
>
> Config files are as such:
>
> # /etc/aliases
> mailer-daemon: postmaster
> postmaster: root
> nobody: root
> hostmaster: root
> usenet: root
> news: root
> webmaster: root
> www: root
> ftp: root
> abuse: root
> noc: root
> security: root
> root: stefhen.hovland@gmail.com
> hovland: stefhen.hovland@gmail.com
>
>
>
> # This is /etc/email-addresses. It is part of the exim package
> #
> # This file contains email addresses to use for outgoing mail. Any local
> # part not in here will be qualified by the system domain as normal.
> #
> # It should contain lines of the form:
> #
> #user: someone@isp.com
> #otheruser: someoneelse@anotherisp.com
>
> root: stefhen.hovland@gmail.com
> hovland: stefhen.hovland@gmail.com
>
>
>
> # /etc/exim4/passwd.client
> ### CONFDIR/passwd.client
> #
> # Format:
> #targetmailserver.example:login:password
> #
> # default entry:
> ### *:bar:foo
> *:stefhen.hovland:password
>
>
> Example transaction from me as hovland trying to email "root", on my local box:
>
> 2005-10-04 19:39:25 1EMxJd-0001tx-SK <= stefhen.hovland@gmail.com
> U=hovland P=local S=429 id=20051005003925.GA7305@gmail.com
> 2005-10-04 19:39:27 1EMxJd-0001tx-SK => root@gmail.com R=smarthost
> T=remote_smtp_smarthost H=gmail-smtp.l.google.com [72.14.205.109]
> X=TLS-1.0:RSA_3DES_EDE_CBC_SHA:24
> 2005-10-04 19:39:27 1EMxJd-0001tx-SK Completed
>
> Shouldnt root get translated to -> stefhen.hovland@gmail.com?
>
> I will receive my message on my gmail account which was directed to
> root, but I also get an error response from gmail that it was trying
> to forward my email also to the user: root@gmail.com
>
>
> Example:
>
> This is an automatically generated Delivery Status Notification
>
> Delivery to the following recipient failed permanently:
>
>     root@gmail.com
>
> Technical details of permanent failure:
> PERM_FAILURE: SMTP Error (state 9): 550 5.7.1 No such user i19si239371wxd
>
>   ----- Original message -----
>
> Received: by 10.64.204.6 with SMTP id b6mr108721qbg;
>        Tue, 04 Oct 2005 17:39:27 -0700 (PDT)
> Return-Path: <stefhen.hovland@gmail.com>
> Received: from localhost.lan ( [68.58.2.94])
>        by mx.gmail.com with ESMTP id e13sm119870qbe.2005.10.04.17.39.27;
>        Tue, 04 Oct 2005 17:39:27 -0700 (PDT)l to root@gmail.com it
> looks like also:
>
>
>
> Any thoughts?
>
> Thanks,
> Stefhen

I had the same problem starting in early September on Sarge with exim4.
I had misunderstood the usage of /etc/mailname and /etc/email-addresses.

The situation for me is:  [using phony names here]
login name = local email name: me [local delivery to /var/mail/me]
hostname:  box.my.domain [/etc/hostname contains box.my.domain which is
  not registered on internet DNS]
remote email name:  meisp@myisp.domain

I changed /etc/mailname to contain:
box.my.domain    [was myisp.domain]

I changed /etc/aliases to contain:
root: me   [had tried root: me@myisp.domain and root: me@box.my.domain
  without success]

I changed /etc/email-addresses to contain:
root: me@box.my.domain
postmaster: me@box.my.domain
me: me@box.my.domain

In /etc/exim4/update-exim4.conf.conf I had:
dc_eximconfig_configtype='smarthost'
dc_other_hostnames='box.my.domain'
dc_relay_domains=''
dc_minimaldns='false'
dc_relay_nets=''
dc_smarthost='smtp.myisp.domain'
CFILEMODE='644'
dc_use_split_config='false'
dc_hide_mailname='false'
dc_mailname_in_oh='true'

I ran as root
# update-exim4
I needed to edit /etc/exim4/exim4.conf.template by hand when I could not
  figure out how to define the macro(?)
  AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS which my ISP required.
My /etc/exim4/passwd.client had been setup correctly earlier
  when I learned that CNAMEs do not work there.
I restarted and reloaded exim4.

I tested as me and as root by running:
echo "foo" | mail -s test1 me
echo "foo" | mail -s test2 root
echo "foo" | mail -s test3 postmaster  [is aliased to root]
echo "foo" | mail -s test4 mailer-daemon  [is aliased to postmaster]
echo "foo" | mail -s test5 security  [is aliased to root]
  These messages were received by me via local processing only, not via
  my isp.  All showed proper headers.
Now my services running cron jobs like logcheck using mail or mailx to
  send me reports began to work again.
I send all external mail using mutt, so my ~/.mutt/muttrc contains:
set from=meisp@myisp.domain
This all works ok.

Simo was correct:  you probably need to change /etc/mailname
  and clean up the other mail files

Can someone explain
1.  How to define AUTH_CLIENT_ALLOW_NOTLS_PASSWORDS
2.  What the following do
  dc_other_hostnames
  dc_hide_mailname
  dc_mailname_in_oh
3.  Whether /etc/email-addresses is used at all in my configuration

Regards, Nick






Reply to: