Michael Coulton
2014-10-28 21:26:36 UTC
Hello
1st let me thank Burkhard Ott for all his help on a previous post of mine. What I'd now like to be able to do is send an email from postfix to an internal email server. Can someone guide me through how I would set this up? Thanks in advance for any help you can give me.
Here is the info:
Ubuntu Server Host File:
127.0.0.1 localhost
127.0.1.1 PBX1
192.168.2.3 mail.azlan.ca
192.168.2.3 ***@azlan.ca
Postfix = 192.168.2.2
Postfix hostname = PBX1
Internal Email Server = 192.168.2.3
FQDN = azlan.ca
sending email to ***@azlan.ca
I've set up a transport file and a transport.db because I read somewhere that I can have an entry of "azlan.ca smtp: 192.168.2.3" and this will force all outgoing mail to the email server. Current the file has a lone entry of "***@azlan.ca 192.268.2.3". I don't think this is correct based on the error log below.
I've tried lots of different configurations and this is my current main.cf
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
transport_maps = hash:/etc/potfix/transport
myhostname = mail.azlan.ca
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = azlan.ca
mydestination = 192.168.2.3, PBX1, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.2.0/254
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_destination_recipient_limit = 1024
inet_protocols = all
Error log message
Oct 28 17:24:11 PBX1 postfix/pickup[12121]: EC15D2C0E18: uid=1000 from=<pbx1>
Oct 28 17:24:11 PBX1 postfix/trivial-rewrite[12210]: error: open database /etc/potfix/transport.db: No such file or directory
Oct 28 17:24:11 PBX1 postfix/trivial-rewrite[12210]: warning: hash:/etc/potfix/transport is unavailable. open database /etc/potfix/transport.db: No such file or directory
Oct 28 17:24:11 PBX1 postfix/trivial-rewrite[12210]: warning: hash:/etc/potfix/transport lookup error for "*"
Oct 28 17:24:11 PBX1 postfix/trivial-rewrite[12210]: warning: hash:/etc/potfix/transport is unavailable. open database /etc/potfix/transport.db: No such file or directory
Oct 28 17:24:11 PBX1 postfix/trivial-rewrite[12210]: warning: hash:/etc/potfix/transport lookup error for "*"
Oct 28 17:24:11 PBX1 postfix/cleanup[12209]: EC15D2C0E18: message-id=<***@mail.azlan.ca>
Oct 28 17:24:12 PBX1 postfix/qmgr[12122]: EC15D2C0E18: from=<***@azlan.ca>, size=263, nrcpt=1 (queue active)
Oct 28 17:24:12 PBX1 postfix/trivial-rewrite[12210]: warning: hash:/etc/potfix/transport is unavailable. open database /etc/potfix/transport.db: No such file or directory
Oct 28 17:24:12 PBX1 postfix/trivial-rewrite[12210]: warning: hash:/etc/potfix/transport lookup error for "***@azlan.ca"
Oct 28 17:24:12 PBX1 postfix/trivial-rewrite[12210]: warning: transport_maps lookup failure
Oct 28 17:24:12 PBX1 postfix/error[12211]: EC15D2C0E18: to=<***@azlan.ca>, relay=none, delay=28, delays=28/0.01/0/0.05, dsn=4.3.0, status=deferred (address resolver failure)
re)
1st let me thank Burkhard Ott for all his help on a previous post of mine. What I'd now like to be able to do is send an email from postfix to an internal email server. Can someone guide me through how I would set this up? Thanks in advance for any help you can give me.
Here is the info:
Ubuntu Server Host File:
127.0.0.1 localhost
127.0.1.1 PBX1
192.168.2.3 mail.azlan.ca
192.168.2.3 ***@azlan.ca
Postfix = 192.168.2.2
Postfix hostname = PBX1
Internal Email Server = 192.168.2.3
FQDN = azlan.ca
sending email to ***@azlan.ca
I've set up a transport file and a transport.db because I read somewhere that I can have an entry of "azlan.ca smtp: 192.168.2.3" and this will force all outgoing mail to the email server. Current the file has a lone entry of "***@azlan.ca 192.268.2.3". I don't think this is correct based on the error log below.
I've tried lots of different configurations and this is my current main.cf
smtpd_relay_restrictions = permit_mynetworks permit_sasl_authenticated defer_unauth_destination
transport_maps = hash:/etc/potfix/transport
myhostname = mail.azlan.ca
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = azlan.ca
mydestination = 192.168.2.3, PBX1, localhost.localdomain, localhost
relayhost =
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.2.0/254
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
smtp_sasl_auth_enable = yes
smtp_sasl_security_options = noanonymous
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_use_tls = yes
smtp_tls_CAfile = /etc/ssl/certs/ca-certificates.crt
smtp_destination_recipient_limit = 1024
inet_protocols = all
Error log message
Oct 28 17:24:11 PBX1 postfix/pickup[12121]: EC15D2C0E18: uid=1000 from=<pbx1>
Oct 28 17:24:11 PBX1 postfix/trivial-rewrite[12210]: error: open database /etc/potfix/transport.db: No such file or directory
Oct 28 17:24:11 PBX1 postfix/trivial-rewrite[12210]: warning: hash:/etc/potfix/transport is unavailable. open database /etc/potfix/transport.db: No such file or directory
Oct 28 17:24:11 PBX1 postfix/trivial-rewrite[12210]: warning: hash:/etc/potfix/transport lookup error for "*"
Oct 28 17:24:11 PBX1 postfix/trivial-rewrite[12210]: warning: hash:/etc/potfix/transport is unavailable. open database /etc/potfix/transport.db: No such file or directory
Oct 28 17:24:11 PBX1 postfix/trivial-rewrite[12210]: warning: hash:/etc/potfix/transport lookup error for "*"
Oct 28 17:24:11 PBX1 postfix/cleanup[12209]: EC15D2C0E18: message-id=<***@mail.azlan.ca>
Oct 28 17:24:12 PBX1 postfix/qmgr[12122]: EC15D2C0E18: from=<***@azlan.ca>, size=263, nrcpt=1 (queue active)
Oct 28 17:24:12 PBX1 postfix/trivial-rewrite[12210]: warning: hash:/etc/potfix/transport is unavailable. open database /etc/potfix/transport.db: No such file or directory
Oct 28 17:24:12 PBX1 postfix/trivial-rewrite[12210]: warning: hash:/etc/potfix/transport lookup error for "***@azlan.ca"
Oct 28 17:24:12 PBX1 postfix/trivial-rewrite[12210]: warning: transport_maps lookup failure
Oct 28 17:24:12 PBX1 postfix/error[12211]: EC15D2C0E18: to=<***@azlan.ca>, relay=none, delay=28, delays=28/0.01/0/0.05, dsn=4.3.0, status=deferred (address resolver failure)
re)