View Full Version : Catch all email catches mail for existing adress?
Xtracted
29th September 2007, 21:20
I just noticed that mail sent to an email adress on one of my sites get caught by my main server sites catch all email adress. The adress exists and should work without any problem.. Any suggestions of where I start looking?
till
30th September 2007, 14:27
Please have a look here:
http://www.howtoforge.com/faq/9_33_en.html
Xtracted
30th September 2007, 15:42
I dont even have the variable $mydomain in that file..
till
30th September 2007, 18:39
Please post the content of your main.cf file, comments stripped.
Xtracted
30th September 2007, 18:54
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
myhostname = www.mydomain.se
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names
falko
30th September 2007, 21:00
The best solution is to get a "technical" domain that you don't use for web sites and email, but for naming your servers only.
You'd then give your server a hostname in that domain and use that hostname for myhostname and mydomain in /etc/postfix/main.cf.
Xtracted
30th September 2007, 21:44
And a subdomain would not work for this?
till
30th September 2007, 22:39
A subdomain is fine too as technical domain.
Xtracted
18th October 2007, 17:10
I created a subdomain, host.mydomain.se and modified main.cf so it looks like this:
smtpd_banner = $myhostname ESMTP $mail_name (Debian/GNU)
biff = no
append_dot_mydomain = no
smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt
smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key
smtpd_use_tls = yes
smtpd_tls_session_cache_database = btree:${queue_directory}/smtpd_scache
smtp_tls_session_cache_database = btree:${queue_directory}/smtp_scache
myhostname = host.mydomain.se
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
myorigin = /etc/mailname
#mydestination = host.mydomain.se, localhost.mydomain.se, , localhost
relayhost =
mynetworks = 127.0.0.0/8
mailbox_command = procmail -a "$EXTENSION"
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all
smtpd_sasl_local_domain =
smtpd_sasl_auth_enable = yes
smtpd_sasl_security_options = noanonymous
broken_sasl_auth_clients = yes
smtpd_recipient_restrictions = permit_sasl_authenticated,permit_mynetworks,reject _unauth_destination
smtpd_tls_auth_only = no
smtp_use_tls = yes
smtp_tls_note_starttls_offer = yes
smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem
smtpd_tls_loglevel = 1
smtpd_tls_received_header = yes
smtpd_tls_session_cache_timeout = 3600s
tls_random_source = dev:/dev/urandom
virtual_maps = hash:/etc/postfix/virtusertable
mydestination = /etc/postfix/local-host-names
My catch all on the domain I used to have before I changed it to host.mydomain.se still catches all emails outside that domain.. inside that domain it works fine..
falko
19th October 2007, 13:45
What's in /etc/mailname?
Xtracted
19th October 2007, 14:06
A-ha! That seems to have done it.. exellent, thank you!
Do I need to change the server hostname in other files as well or will this do it?
falko
21st October 2007, 01:05
Do I need to change the server hostname in other files as well
No, you don't. :)
vBulletin® v3.8.4, Copyright ©2000-2009, Jelsoft Enterprises Ltd.