.forward and aliases do not work

Hi,

I am new in Network Admin. I have just configured a XServe as a gateway between my local network and the Internet. The Internet connection works well, as the Mail Service.
My problem is the following, when I create a user account with an imap mailbox and I put in a .forward another address, the user mailbox receives mails while the forwarded address doesn't.
I have tried by creating a forwarded address directly in Server Admin or by filling /etc/aliases and /etc/postfix/aliases, then postalias /etc/(postfix/)aliases and newaliases. The problem is always the same.

Some idea ?

Thank you very much,
joe

MacPro Quad-Xeon 2,6GHz, Mac OS X (10.5.1)

Posted on Dec 13, 2007 12:34 PM

Reply
26 replies

Dec 14, 2007 10:10 AM in response to pterobyte

Thanks.

It was probably due to mistakes in postfix config files. The problem is now different, I activate the forwarding in Workgroup Manager and the forwarded address receives the mail but the sender receives also an mailer daemon. This is very strange.
Logs say that the local mailbox is not known :

+Dec 14 19:00:20 ns postfix/qmgr[60362]: 097A8D642A: from=<user@gmail.com>, size=4370, nrcpt=1 (queue active)+
+Dec 14 19:00:20 ns postfix/lmtp[60378]: D9ABFD6426: to=<user@epigenomique.genopole.fr>, relay=ns.epigenomique.genopole.fr[/var/imap/socket/lmtp], delay=0.17, delays=0.1/0.01/0.01/0.06, dsn=5.1.1, status=bounced (host ns.epigenomique.genopole.fr[/var/imap/socket/lmtp] said: 550-Mailbox unknown. Either there is no mailbox associated with this 550-name or you do not have authorization to see it. 550 5.1.1 User unknown (in reply to end of DATA command))+


Thanks a lot.

joe

Dec 14, 2007 3:37 PM in response to joe-farka

I had a very similar problem and it turned out that I had virtual hosting turned on. When you have virtual hosting turned on you'll need to use /etc/postfix/virtual instead of /etc/aliases. In my case I really didn't need virtual hosting, I just needed to put entries in local host aliases which worked just fine (since the users share the same accounts across multiple domains).

Hope this helps.

Dec 15, 2007 12:59 AM in response to pterobyte

postconf -n

command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug peerlevel = 2
enable serveroptions = yes
html_directory = no
inet_interfaces = all
mail_owner = _postfix
mailbox sizelimit = 0
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
message sizelimit = 10485760
mydomain = epigenomique.genopole.fr
mydomain_fallback = localhost
myhostname = ns.epigenomique.genopole.fr
mynetworks = 127.0.0.0/8,193.51.128.144/29,192.168.0.0/24,193.51.128.129/32
newaliases_path = /usr/bin/newaliases
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = _postdrop
smtpd enforcetls = no
smtpd pw_server_securityoptions = none
smtpd recipientrestrictions = permit mynetworks,reject_unauthdestination,permit
smtpd sasl_authenable = no
smtpd tls_certfile = /etc/certificates/Epigenomics.crt
smtpd tls_keyfile = /etc/certificates/Epigenomics.key
smtpd use_pwserver = no
smtpd usetls = yes
unknown local_recipient_rejectcode = 550
virtual mailboxdomains = hash:/etc/postfix/virtual_domains
virtual_transport = lmtp:unix:/var/imap/socket/lmtp

Dec 15, 2007 8:42 AM in response to joe-farka

Add epigenomique.genopole.fr to
Server Admin -> Mail -> Settings -> Advanced -> Hosting -> Local Host Aliases

If it is already in virtual domains, remove it from there. Virtual Domains are broken in Leopard. If you must/want to use virtual domains see here: http://osx.topicdesk.com/content/view/45/41/

If however you have only one domain, there is no need to use virtual domains at all.

Dec 15, 2007 11:07 AM in response to pterobyte

if I delete epigenomique.genopole.fr in virtual domains, I have the same behavior than previously but the error message delivered by mailer daemon has changed and is the same that I had before enabling virtual hosting :

+Technical details of permanent failure:+
+PERM_FAILURE: SMTP Error (state 13): 554 5.7.1 <username@epigenomique.genopole.fr>: Relay access denied+

Thanks
joe

Dec 18, 2007 7:18 AM in response to pterobyte

virtual is empty and postconf -n gives: (I don't understand anything, I have disabled all forward and modifications found in the link you gave me and the Mail System continues to forward mails to gmail mailbox (???))

command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug peerlevel = 2
enable serveroptions = yes
html_directory = no
inet_interfaces = all
mail_owner = _postfix
mailbox sizelimit = 0
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
maps rbldomains =
message sizelimit = 10485760
mydestination = $myhostname,localhost.$mydomain,localhost,epigenomique.genopole.fr
mydomain = epigenomique.genopole.fr
mydomain_fallback = localhost
myhostname = ns.epigenomique.genopole.fr
mynetworks = 127.0.0.0/8,193.51.128.144/29,192.168.0.0/24,193.51.128.129/32
newaliases_path = /usr/bin/newaliases
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = _postdrop
smtpd clientrestrictions = permit_mynetworks reject rblclient zen.spamhaus.org permit
smtpd enforcetls = no
smtpd pw_server_securityoptions = cram-md5
smtpd recipientrestrictions = permit sasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
smtpd sasl_authenable = yes
smtpd tls_certfile = /etc/certificates/ns.epigenomique.genopole.fr.crt
smtpd tls_keyfile = /etc/certificates/ns.epigenomique.genopole.fr.key
smtpd tlsloglevel = 0
smtpd use_pwserver = yes
smtpd usetls = yes
unknown local_recipient_rejectcode = 550
virtual mailboxdomains =
virtual_transport = virtual

Dec 18, 2007 7:23 AM in response to joe-farka

Not sure I understand you. First you said forwarding didn't work, then that you couldn't receive mail and now that you can't stop forwarding?
Sorry, but it is impossible to help you if you continue to jump from one topic/issue to the other.

Please list the issues you are currently having (with log entries) and do not change anything until advised.

Dec 18, 2007 8:29 AM in response to pterobyte

Ok, sorry.

My mail server is in production for about a dozen of persons, so I can't play a lot with it. Each time I test something, immediatly after I put it in the right away.
So, now, forwading is disabled and not working. I am using a virtual domain 'epigenomique.genopole.fr', I have enabled it in Server Admin and I have localhost in aliases (in Server Admin).

This is the result of postconf -n :


command_directory = /usr/sbin
config_directory = /etc/postfix
content_filter = smtp-amavis:[127.0.0.1]:10024
daemon_directory = /usr/libexec/postfix
debug peerlevel = 2
enable serveroptions = yes
html_directory = no
inet_interfaces = all
mail_owner = _postfix
mailbox sizelimit = 0
mailbox_transport = cyrus
mailq_path = /usr/bin/mailq
manpage_directory = /usr/share/man
maps rbldomains =
message sizelimit = 10485760
mydestination = $myhostname,localhost.$mydomain,localhost
mydomain = epigenomique.genopole.fr
mydomain_fallback = localhost
myhostname = ns.epigenomique.genopole.fr
mynetworks = 127.0.0.0/8,193.51.128.144/29,192.168.0.0/24,193.51.128.129/32
newaliases_path = /usr/bin/newaliases
queue_directory = /private/var/spool/postfix
readme_directory = /usr/share/doc/postfix
sample_directory = /usr/share/doc/postfix/examples
sendmail_path = /usr/sbin/sendmail
setgid_group = _postdrop
smtpd enforcetls = no
smtpd pw_server_securityoptions = cram-md5
smtpd recipientrestrictions = permit sasl_authenticated,permit_mynetworks,reject_unauthdestination,permit
smtpd sasl_authenable = yes
smtpd tls_certfile = /etc/certificates/ns.epigenomique.genopole.fr.crt
smtpd tls_keyfile = /etc/certificates/ns.epigenomique.genopole.fr.key
smtpd tlsloglevel = 0
smtpd use_pwserver = yes
smtpd usetls = yes
unknown local_recipient_rejectcode = 550
virtual mailboxdomains = hash:/etc/postfix/virtual_domains
virtual_transport = lmtp:unix:/var/imap/socket/lmtp


Thanks a lot,
joe

Dec 18, 2007 8:49 AM in response to joe-farka

OK. I believe we need to take one step back here.

How many domains do you want to run on your server? 1 or more?
If only one, then you don't need to use virtual domains at all.

If more then one, but with the same users in each domain, then you still don't need virtual domains.

If more than one, with users by the same name being different in each domain, then you need virtual domains. In that case you must decide where epigenomique.genopole.fr has to be.

Currently you have configured your main domain to be epigenomique.genopole.fr:
mydomain = epigenomique.genopole.fr

So it should not be a virtual domain as well.

This thread has been closed by the system or the community team. You may vote for any posts you find helpful, or search the Community for additional answers.

.forward and aliases do not work

Welcome to Apple Support Community
A forum where Apple customers help each other with their products. Get started with your Apple Account.