1

I'm running Ubuntu 12 Precise Pangolin and am trying to configure my server to catchall mail sent to it and forward it to my gmail address. I've been trying lots of examples online like editing my main.cf file which looks like this:

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/ssl-cert-snakeoil.pem
smtpd_tls_key_file=/etc/ssl/private/ssl-cert-snakeoil.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 = destiny
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
mydestination = destiny, localhost.localdomain, localhost
relayhost = smtp.sendgrid.net
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128
mailbox_size_limit = 51200000
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

In my /etc/postfix/virtual I have:

@mydomain.com [email protected]
@myotherdomain.com [email protected]

Which isn't working when I email [email protected] or [email protected].

So I got the recommendation to add the following to my /etc/alias:

postmaster:root
root:[email protected]

restarted postfix, and tried emailing [email protected] or [email protected] but it still won't send.

Does anyone have any idea what I'm doing wrong here? I'd appreciate any help.

1
  • You will not do this. Therefore Google invented Gmail to use with your own domain. That's what you want.
    – mailq
    Sep 19, 2012 at 20:59

1 Answer 1

0

Your main.cf doesn't seem to have virtual_alias_maps. Please replace your listing of main.cf with the output of postconf -n to make sure. For further investigation provide a log excerpt of one mail transaction for a mail sent to [email protected] starting with the point where it's submitted into Postfix up to the point where Postfix decides what to do with it. Easiest way to do this is by greping the log for the queue ID of one such transaction, e.g.:

# grep A19BEB5071E /var/log/mail.log
Sep 14 08:34:16 server postfix/qmgr[20790]: A19BEB5071E: from=<[email protected]>, size=1922, nrcpt=1 (queue active)
Sep 14 08:34:16 server postfix/smtpd[32758]: proxy-accept: END-OF-MESSAGE: 250 2.0.0 Ok: queued as A19BEB5071E; from=<[email protected]> to=<[email protected]> proto=ESMTP helo=<host.example.com>
Sep 14 08:34:16 server postfix/pipe[32764]: A19BEB5071E: to=<[email protected]>, relay=cyrus, delay=0.62, delays=0.58/0.01/0/0.04, dsn=2.0.0, status=sent (delivered via cyrus service)
Sep 14 08:34:16 server postfix/qmgr[20790]: A19BEB5071E: removed

And FTR, using a catch-all is not a good idea in this day and age. I strongly recommend against doing that.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .