Kent
2013-09-04 16:57:21 UTC
Hi!
I am new to Postfix, trying to get by using the documentation and online tutorials. However, I have a problem I do not know how to resolve by myself.
I am trying to send all local mail to a single external e-mail, using Google's SMTP servers.
Using Google's SMTP servers work, as I am able to send mail to external addresses work using mail from mailutils.
The redirection of local mail to the external e-mail does not work. When sending a mail to root from my account test using:
echo "Body" | mail -s "Test Postfix To Root" root
* I never recieve the message
* Nothing new turns up in /var/log/mail.err
* This turns up in /var/log/mail.log
Sep 4 18:48:06 desktop1204test postfix/pickup[5535]: C9326EE26: uid=1000 from=<test>
Sep 4 18:48:06 desktop1204test postfix/cleanup[5702]: C9326EE26: message-id=<***@desktop1204test.localdomain>
Sep 4 18:48:06 desktop1204test postfix/qmgr[5534]: C9326EE26: from=<***@desktop1204test.localdomain>, size=401, nrcpt=1 (queue active)
Sep 4 18:48:06 desktop1204test postfix/local[5704]: C9326EE26: to=<***@desktop1204test.localdomain>, orig_to=<***@desktop1204test>, relay=local, delay=0.03, delays=0.02/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 4 18:48:06 desktop1204test postfix/qmgr[5534]: C9326EE26: removed
My /etc/postfix/main.cf:
inet_interfaces = loopback-only
mynetworks = loopback-only
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_alias_domains = localhost.localdomain
virtual_alias_maps = hash:/etc/postfix/virtual
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes
My etc/aliases:
# See man 5 aliases for format
postmaster: root
My /etc/postfix/virtual:
@localhost.localdomin ***@somewhere.com
How can I get it working? I don't want any local mail to arrive locally, they should all go to "***@somewhere.com".
Best regards,
Kent
I am new to Postfix, trying to get by using the documentation and online tutorials. However, I have a problem I do not know how to resolve by myself.
I am trying to send all local mail to a single external e-mail, using Google's SMTP servers.
Using Google's SMTP servers work, as I am able to send mail to external addresses work using mail from mailutils.
The redirection of local mail to the external e-mail does not work. When sending a mail to root from my account test using:
echo "Body" | mail -s "Test Postfix To Root" root
* I never recieve the message
* Nothing new turns up in /var/log/mail.err
* This turns up in /var/log/mail.log
Sep 4 18:48:06 desktop1204test postfix/pickup[5535]: C9326EE26: uid=1000 from=<test>
Sep 4 18:48:06 desktop1204test postfix/cleanup[5702]: C9326EE26: message-id=<***@desktop1204test.localdomain>
Sep 4 18:48:06 desktop1204test postfix/qmgr[5534]: C9326EE26: from=<***@desktop1204test.localdomain>, size=401, nrcpt=1 (queue active)
Sep 4 18:48:06 desktop1204test postfix/local[5704]: C9326EE26: to=<***@desktop1204test.localdomain>, orig_to=<***@desktop1204test>, relay=local, delay=0.03, delays=0.02/0/0/0, dsn=2.0.0, status=sent (delivered to mailbox)
Sep 4 18:48:06 desktop1204test postfix/qmgr[5534]: C9326EE26: removed
My /etc/postfix/main.cf:
inet_interfaces = loopback-only
mynetworks = loopback-only
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
virtual_alias_domains = localhost.localdomain
virtual_alias_maps = hash:/etc/postfix/virtual
relayhost = [smtp.gmail.com]:587
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_security_options = noanonymous
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_use_tls = yes
My etc/aliases:
# See man 5 aliases for format
postmaster: root
My /etc/postfix/virtual:
@localhost.localdomin ***@somewhere.com
How can I get it working? I don't want any local mail to arrive locally, they should all go to "***@somewhere.com".
Best regards,
Kent