Hi

I am trying to realize a simple postfix setup. The mailer is serving one
domain with just one (maybe more later on) email address, which should
be aliased to another, external email address.

However, I cannot manage to have the aliasing work. Whenever a mail is
received, it is first forwarded to the "local account", and then,
instead of being sent to the external address, it is once more sent to
the local address, and - as the "Delivered-To" header already contains
this local address - the mail is bounced back to the sender (reason:
mail-forwarding loop, which - I have to admit - is not completely
mistaken...).

I already had a similar setup before, but about three weeks ago, I
unfortunately tried to add a second local address to be aliased to an
external address, and since (after executing postalias), the aliasing is
not working any more. I even re-did the whole configuration "from
scratch", but this didn't help. I don't know what else to try, but
someone here might got an idea. Please also advise if I have to provide
more (verbose) logging information...

Thanks,
Marcial


PS: Here is some information about my setup, and what I checked for so far:

- The mailer is receiving mail for amyca.ch
- There is only one address ("contact") configured in the aliases database
- There is no local user "contact" (i.e. in /etc/passwd)
- There is no .forward file on the system
- Mails to "cont...@amyca.ch" should be aliased/forwarded to
"am...@swissonline.ch"

My configuration:

amyca postfix # postconf -n
alias_database = hash:/etc/postfix/aliases.db
alias_maps = hash:/etc/postfix/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/lib/postfix
debug_peer_level = 2
default_destination_concurrency_limit = 2
home_mailbox = .maildir/
html_directory = /usr/share/doc/postfix-2.3.6/html
inet_interfaces = all
local_destination_concurrency_limit = 2
local_recipient_maps = $alias_maps
mail_owner = postfix
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message_size_limit = 50000000
mydestination = $mydomain
mydomain = amyca.ch
myhostname = mail.amyca.ch
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.3.6/readme
relay_domains =
relayhost = smtp.hispeed.ch
sample_directory = /etc/postfix
sendmail_path = /usr/sbin/sendmail
setgid_group = postdrop
smtp_sasl_password_maps = hash:/etc/postfix/smtp_auth
smtp_sasl_security_options = noanonymous
smtpd_helo_required = yes
unknown_local_recipient_reject_code = 550

My aliases file:

amyca postfix # cat /etc/postfix/aliases
contact: am...@swissonline.ch

Simple log when sending an email to cont...@amyca.ch:

amyca postfix # cat /var/log/mail.log

Jan 29 21:07:52 amyca postfix/postfix-script: starting the Postfix mail
system
Jan 29 21:07:52 amyca postfix/master[15308]: daemon started -- version
2.3.6, configuration /etc/postfix
Jan 29 21:08:14 amyca postfix/smtpd[15313]: connect from
viefep16-int.chello.at[62.179.121.36]
Jan 29 21:08:14 amyca postfix/smtpd[15313]: 737B63FF5F:
client=viefep16-int.chello.at[62.179.121.36]
Jan 29 21:08:14 amyca postfix/cleanup[15316]: 737B63FF5F:
message-id=<49820c35.9020...@swissonline.ch>
Jan 29 21:08:14 amyca postfix/qmgr[15312]: 737B63FF5F:
from=<marcial.r...@swissonline.ch>, size=983, nrcpt=1 (queue active)
Jan 29 21:08:14 amyca postfix/smtpd[15313]: disconnect from
viefep16-int.chello.at[62.179.121.36]
Jan 29 21:08:14 amyca postfix/cleanup[15316]: BDED441E55:
message-id=<49820c35.9020...@swissonline.ch>
Jan 29 21:08:14 amyca postfix/qmgr[15312]: BDED441E55:
from=<marcial.r...@swissonline.ch>, size=1108, nrcpt=1 (queue active)
Jan 29 21:08:14 amyca postfix/local[15317]: 737B63FF5F:
to=<cont...@amyca.ch>, relay=local, delay=0.46, delays=0.33/0.1/0/0.03,
dsn=2.0.0, status=sent (forwarded as BDED441E55)
Jan 29 21:08:14 amyca postfix/qmgr[15312]: 737B63FF5F: removed
Jan 29 21:08:14 amyca postfix/local[15317]: BDED441E55:
to=<cont...@amyca.ch>, relay=local, delay=0.16, delays=0.03/0/0/0.13,
dsn=5.4.6, status=bounced (mail forwarding loop for cont...@amyca.ch)
Jan 29 21:08:14 amyca postfix/cleanup[15316]: E61DD42604:
message-id=<20090129200814.e61dd42...@mail.amyca.ch>
Jan 29 21:08:14 amyca postfix/qmgr[15312]: E61DD42604: from=<>,
size=2854, nrcpt=1 (queue active)
Jan 29 21:08:14 amyca postfix/bounce[15319]: BDED441E55: sender
non-delivery notification: E61DD42604
Jan 29 21:08:14 amyca postfix/qmgr[15312]: BDED441E55: removed
Jan 29 21:08:16 amyca postfix/smtp[15321]: E61DD42604:
to=<marcial.r...@swissonline.ch>,
relay=smtp.hispeed.ch[213.46.255.24]:25, delay=1.7,
delays=0.03/0.12/1.2/0.34, dsn=2.0.0, status=sent (250 2.0.0
9Y6F1b01H43BjkG02Y6GT8 message accepted for delivery)
Jan 29 21:08:16 amyca postfix/qmgr[15312]: E61DD42604: removed

A more verbose log trace (with -v enabled on the local delivery daemon)
can be found here:

http://www.copypaste.at/271

Check for line 234:

Jan 29 21:15:48 amyca postfix/local[15467]: deliver_alias:
hash:/etc/postfix/aliases(0,lock|no_regsub|no_proxy|no_unauth|fold_fix):
contact = am...@swissonline.ch

which seems to have matched the alias...











Reply via email to