PostFix

The config files are as follows:

/etc/postfix/main.cf:

myhostname = host.domain.com
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
relayhost = outgoing.domain.com
mynetworks = 127.0.0.0/8
mailbox_command =
mailbox_size_limit = 0
recipient_delimiter = +
mydestination = mysql:/etc/postfix/mysql-transport.cf
local_recipient_maps = mysql:/etc/postfix/mysql-localusers1.cf
transport_maps = mysql:/etc/postfix/mysql-transport.cf

/etc/postfix/master.cf (has this line at the bottom):

dbmail unix - n n - - pipe
flags= user=dbmail:dbmail argv=/usr/sbin/dbmail-smtp -d ${recipient}

/etc/postfix/mysql-transport.cf:

user = secretUser
password = secretPassword
dbname = postfix
table = transport
hosts = 192.168.1.200
select_field = transport
where_field = domain

/etc/postfix/mysql-localusers1.cf:

user = secret
password = secret
dbname = dbmail
hosts = 192.168.1.200
table = dbmail_aliases
select_field = alias
where_field = alias
postconf -e "myorigin = yourdomain.com"
postconf -e "myhostname = yourdomain.com"
postconf -e "relay_domains = yourdomain.com"
postfix reload

Do some testing from the command line:

telnet localhost 25
mail from:
rcpt to:
data
To: someone@somemailprovider
From: test1@yourdomain.com
Subject: Hey my first email
This is my first email on debian postfix after installing configuring it.
It was easy.
.

quit

Leave a Reply

Your email address will not be published. Required fields are marked *

*

You may use these HTML tags and attributes: <a href="" title=""> <abbr title=""> <acronym title=""> <b> <blockquote cite=""> <cite> <code> <del datetime=""> <em> <i> <q cite=""> <strike> <strong>

Our weather forecast is from Wordpress Weather