Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

I'm trying to get my Postfix mail server to forward e-mail sent to jason@woollymammothlabs.com to jason.swett@gmail.com. I'm following the instructions I found here.

When I send a message to jason@woollymammothlabs.com, I receive the e-mail on my mail server but the message doesn't get forwarded to jason.swett@gmail.com. My /etc/postfix/virtual file looks like this:

jason@woollymammothlabs.com jason@woollymammothlabs.com, jason.swett@gmail.com

(My goal here is to forward the message back to jason@woollymamothlabs.com as well as jason.swett@gmail.com so I know if the e-mail is even going through at all.)

Any idea why the message isn't getting forwarded to my GMail account? (And no, it's not in my spam folder.)

Below is my /etc/postfix/main.cf and tail of /var/log/mail.log if that helps.

main.cf:

# See /usr/share/postfix/main.cf.dist for a commented, more complete version
# Debian specific:  Specifying a file name will cause the first
# line of that file to be used as the name.  The Debian default
# is /etc/mailname.
#myorigin = /etc/mailname

smtpd_banner = $myhostname ESMTP $mail_name (Ubuntu)
biff = no

# appending .domain is the MUA's job.
append_dot_mydomain = no

# Uncomment the next line to generate "delayed mail" warnings
#delay_warning_time = 4h

readme_directory = no

# TLS parameters
smtpd_tls_cert_file = /etc/ssl/certs/smtpd.crt
smtpd_tls_key_file = /etc/ssl/private/smtpd.key
smtpd_use_tls=yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache

# See /usr/share/doc/postfix/TLS_README.gz in the postfix-doc package for
# information on enabling SSL in the smtp client.

myhostname = woollymammothlabs.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = woollymammothlabs.com, li173-195.members.linode.com, localhost.members.linode.com, localhost
virtual_alias_domains = woollymammothlabs.com
virtual_alias_maps = hash:/etc/postfix/virtual
relayhost = 
mynetworks = 127.0.0.0/8
mailbox_command = 
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
home_mailbox = Maildir/
smtpd_sasl_local_domain = 
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject_unauth_destination
smtp_tls_security_level = may
smtpd_tls_security_level = may
smtpd_tls_auth_only = no
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/ssl/certs/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom

mail.log:

Sep  8 16:08:59 localhost postfix/cleanup[10385]: 7AA672AB44: message-id=<AANLkTikC-G3vTfkci0npfkG6T3s6S6=Fu20cw=8_9Mrt@mail.gmail.com>
Sep  8 16:08:59 localhost postfix/qmgr[10377]: 7AA672AB44: from=<jason.swett@gmail.com>, size=2324, nrcpt=2 (queue active)
Sep  8 16:08:59 localhost postfix/trivial-rewrite[10384]: warning: do not list domain woollymammothlabs.com in BOTH mydestination and virtual_alias_domains
Sep  8 16:08:59 localhost postfix/local[10386]: 7AA672AB44: to=<jason@woollymammothlabs.com>, relay=local, delay=0.08, delays=0.07/0.01/0/0, dsn=2.0.0, status=sent (delivered to maildir)
Sep  8 16:09:00 localhost postfix/smtp[10387]: 7AA672AB44: to=<jason.swett@gmail.com>, orig_to=<jason@woollymammothlabs.com>, relay=gmail-smtp-in.l.google.com[74.125.65.27]:25, delay=1.3, delays=0.07/0.01/0.02/1.2, dsn=2.0.0, status=sent (250 2.0.0 OK 1283962140 d1si13779076ybi.21)
Sep  8 16:09:00 localhost postfix/qmgr[10377]: 7AA672AB44: removed
Sep  8 16:09:29 localhost postfix/smtpd[10380]: disconnect from mail-vw0-f47.google.com[209.85.212.47]
Sep  8 16:12:49 localhost postfix/anvil[10383]: statistics: max connection rate 1/60s for (smtp:209.85.212.47) at Sep  8 16:08:59
Sep  8 16:12:49 localhost postfix/anvil[10383]: statistics: max connection count 1 for (smtp:209.85.212.47) at Sep  8 16:08:59
Sep  8 16:12:49 localhost postfix/anvil[10383]: statistics: max cache size 1 at Sep  8 16:08:59
share|improve this question
2  
According to your mail.log something has been successfully sent out to GMail: Sep 8 16:09:00 localhost postfix/smtp[10387]: 7AA672AB44: to=<jason.swett@gmail.com>, orig_to=<jason@woollymammothlabs.com>, relay=gmail-smtp-in.l.google.com[74.125.65.27]:25, delay=1.3, delays=0.07/0.01/0.02/1.2, dsn=2.0.0, status=sent (250 2.0.0 OK 1283962140 d1si13779076ybi.21) –  Janne Pikkarainen Sep 8 '10 at 16:41
    
Okay, so if it's not in my spam folder, what happened to the message? –  Jason Swett Sep 10 '10 at 2:38
    
Hi. As Janne said, your log clearly shows that the mail was sent to one of the Gmail SMTP servers. If you can't find the mail in your inbox, may I suggest that you try to forward to another email address (not a Gmail one) ? Just to validate that your Postfix setup is ok. –  klipz Feb 10 '11 at 13:58
add comment

1 Answer 1

Jason - I've been having much the same problem as you. I can recommend this Postfix guide which cleared everything up for me. I actually purged my old Postfix installation and reinstalled it with those instructions. In the addresses file it advises you to create, simply swap the local user name for an email address to forward to.

As for testing, do your testing with a third party email address (one that's not part of the redirect/relay configuration). When I tested from my Google account the messages failed, but they were always delivered when I sent through Yahoo.

share|improve this answer
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.