Hi to everybody.
I'm realizing a postfix mailserver following this howto:
http://www.howtoforge.com/virtual-us...l-debian-lenny
Basically I want to hold all emails to be sent (I'll send them manually when I want), plus I want to relay all the emails to different smtp servers (depends of the email).
So, more or less the main.cf of postfix look like that (I'll post just the important parts):
Code:
# TLS parameters
smtpd_tls_cert_file = /etc/postfix/smtpd.cert
smtpd_tls_key_file = /etc/postfix/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${data_directory}/smtpd_scache
smtpd_tls_CAfile = /etc/postfix/cacert.pem
smtpd_tls_received_header = yes
smtpd_tls_ask_ccert = yes
smtpd_tls_loglevel = 1
smtp_tls_session_cache_database = btree:${data_directory}/smtp_scache
smtp_tls_CAfile = /etc/postfix/cacert.pem
smtp_tls_cert_file = /etc/postfix/smtpd.cert
smtp_tls_key_file = /etc/postfix/smtpd.key
smtp_use_tls = yes
smtp_tls_scert_verifydepth = 5
smtp_tls_loglevel = 1
smtp_sasl_auth_enable = yes
smtp_sasl_password_maps = hash:/etc/postfix/sasl_passwd
smtp_sasl_type = cyrus
smtp_sasl_security_options = noanonymous
smtp_sasl_tls_security_options = $smtp_sasl_security_options
smtp_sasl_tls_verified_security_options = $smtp_sasl_security_options
smtp_tls_loglevel = 2
smtpd_sasl_auth_enable = yes
broken_sasl_auth_clients = yes
smtpd_sasl_authenticated_header = yes
smtpd_recipient_restrictions = permit_mynetworks, permit_sasl_authenticated, reject_unauth_destination
relayhost =
virtual_alias_domains =
virtual_alias_maps = proxy:mysql:/etc/postfix/mysql-virtual_forwardings.cf, mysql:/etc/postfix/mysql-virtual_email2email.cf
virtual_mailbox_domains = proxy:mysql:/etc/postfix/mysql-virtual_domains.cf
virtual_mailbox_maps = proxy:mysql:/etc/postfix/mysql-virtual_mailboxes.cf
virtual_mailbox_base = /var/vmail
transport_maps = proxy:mysql:/etc/postfix/mysql-virtual_transports.cf
relay_domains = mysql:/etc/postfix/mysql-virtual_relaydomains.cf
sender_dependent_relayhost_maps = hash:/etc/postfix/bysenderrelay
defer_transports = hold
default_transport = hold
proxy_read_maps = $local_recipient_maps $mydestination $virtual_alias_maps $virtual_alias_domains $virtual_mailbox_maps $virtual_mailbox_domains
$relay_recipient_maps $relay_domains $canonical_maps $sender_canonical_maps $recipient_canonical_maps $relocated_maps $transport_maps $mynetworks
$virtual_mailbox_limit_maps
As users I've email from my main mailserver and emails from gmail, hotmail, yahoo, etc...
To relay emails to gmail(or every smtp server that require CA), I've created a CA (following this howto:
http://www.marksanborn.net/linux/sen...tu-lts-server/).
The problems that I've are:
1) I've setup in bysenderrelay the relay policy dependent of the sender, and in the database mail_transport(used by mysql-virtual_transports.cf), I've write
all local emails, like that:
Code:
user1@domain.com :
user2@domain2.com :
I did't put the value:
Code:
* smtp:[mail.domain.com]
because otherwise I was not able to use the feature sender_dependent_relayhost_maps (all the email not direct to an internal account will be relayed to mail.domain.com).
It's working fine for internal emails, but if I've as local email
user@gmail.com and I want to send an email to
another@gmail.com, postfix think that gmail is a local domain and he believe that
another@gmail.com is a local email.
2) After the configuration of the CA, I'm able to relay correctly emails to gmail and hotmail, but not to yahoo (I know that yahoo is working even without SSL, but I want that postfix will work with all the servers)
3) about the mail queued(the ones that needs to be sent), there is a way to see the subject of them? With mailq I can not see it
I hope somebody can give me some suggestions...
Thanks
Michele