This is a discussion on postfix virtual hosting name.domain.com@domain.com within the mailing.postfix.users forums, part of the Mail Servers and Related category; First off, I'm running a postfix server on Fedora Core 5 with several virtual/hosted domains. When sending an ...
|
|||||||
| FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
|
|||
|
First off, I'm running a postfix server on Fedora Core 5 with several
virtual/hosted domains. When sending an email from any application (including squirrelmail) that does not explicitly specify a reply-to address, the postfix shows that the message is coming from user.domain.com@domain.com and replies do not work. Is there a way to rewrite the reply address so that it is formatted properly as user@domain.com. |
|
|||
|
wisptech@gmail.com wrote:
> First off, I'm running a postfix server on Fedora Core 5 with several > virtual/hosted domains. When sending an email from any application > (including squirrelmail) that does not explicitly specify a reply-to > address, the postfix shows that the message is coming from > user.domain.com@domain.com and replies do not work. Is there a way to > rewrite the reply address so that it is formatted properly as > user@domain.com. Offhand, the incorrect munging of the user-part of an email address doesn't sound like a Postfix issue. But there's no way to tell without looking at the configs. To start with, it would nice to see the output of "postconf -n". -- Greg |
|
|||
|
Here you are....
alias_maps = hash:/etc/aliases broken_sasl_auth_clients = yes command_directory = /usr/sbin config_directory = /etc/postfix daemon_directory = /usr/libexec/postfix debug_peer_level = 2 delay_warning_time = 5 html_directory = no mailbox_command = /usr/bin/procmail mailbox_size_limit = 200000000 mailq_path = /usr/bin/mailq.postfix manpage_directory = /usr/share/man maps_rbl_reject_code = 571 message_size_limit = 200000000 newaliases_path = /usr/bin/newaliases.postfix readme_directory = /usr/share/doc/postfix-2.2.2/README_FILES sample_directory = /usr/share/doc/postfix-2.2.2/samples sendmail_path = /usr/sbin/sendmail.postfix setgid_group = postdrop smtp_tls_note_starttls_offer = yes smtp_use_tls = yes smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) smtpd_client_restrictions = permit_mynetworks, reject_rbl_client sbl-xbl.spamhaus.org, permit smtpd_recipient_limit = 50 smtpd_recipient_restrictions = reject_non_fqdn_recipient,reject_unknown_recipient _domain,permit_sasl_authenticated,permit_mynetwork s,reject_unauth_destination,permit smtpd_sasl_auth_enable = yes smtpd_sasl_local_domain = smtpd_sasl_security_options = noanonymous smtpd_timeout = 500s smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem smtpd_tls_auth_only = no smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key smtpd_tls_loglevel = 1 smtpd_tls_received_header = yes smtpd_tls_session_cache_timeout = 3600s smtpd_use_tls = yes tls_random_source = dev:/dev/urandom unknown_local_recipient_reject_code = 550 virtual_alias_maps = hash:/etc/postfix/virtual |
|
|||
|
wisptech@gmail.com wrote:
> Here you are.... > > alias_maps = hash:/etc/aliases > broken_sasl_auth_clients = yes > command_directory = /usr/sbin > config_directory = /etc/postfix > daemon_directory = /usr/libexec/postfix > debug_peer_level = 2 > delay_warning_time = 5 > html_directory = no > mailbox_command = /usr/bin/procmail > mailbox_size_limit = 200000000 > mailq_path = /usr/bin/mailq.postfix > manpage_directory = /usr/share/man > maps_rbl_reject_code = 571 > message_size_limit = 200000000 > newaliases_path = /usr/bin/newaliases.postfix > readme_directory = /usr/share/doc/postfix-2.2.2/README_FILES > sample_directory = /usr/share/doc/postfix-2.2.2/samples > sendmail_path = /usr/sbin/sendmail.postfix > setgid_group = postdrop > smtp_tls_note_starttls_offer = yes > smtp_use_tls = yes > smtpd_banner = $myhostname ESMTP $mail_name ($mail_version) > smtpd_client_restrictions = permit_mynetworks, reject_rbl_client > sbl-xbl.spamhaus.org, permit > smtpd_recipient_limit = 50 > smtpd_recipient_restrictions = > reject_non_fqdn_recipient,reject_unknown_recipient _domain,permit_sasl_authenticated,permit_mynetwork s,reject_unauth_destination,permit > smtpd_sasl_auth_enable = yes > smtpd_sasl_local_domain = > smtpd_sasl_security_options = noanonymous > smtpd_timeout = 500s > smtpd_tls_CAfile = /etc/postfix/ssl/cacert.pem > smtpd_tls_auth_only = no > smtpd_tls_cert_file = /etc/postfix/ssl/smtpd.crt > smtpd_tls_key_file = /etc/postfix/ssl/smtpd.key > smtpd_tls_loglevel = 1 > smtpd_tls_received_header = yes > smtpd_tls_session_cache_timeout = 3600s > smtpd_use_tls = yes > tls_random_source = dev:/dev/urandom > unknown_local_recipient_reject_code = 550 > virtual_alias_maps = hash:/etc/postfix/virtual Those look okay. But just out of curiosity, were none of these configured? myhostname mydomain mydestination mynetworks Is there anything unusual in the virtual_alias_maps or procmail.rc that could munge the user-part of the email address? -- Greg |
|
|||
|
Contents of procmailrc
DROPPRIVS=yes :0fw | /usr/bin/spamc Alias maps just contains the normal looking email addresses and is located at /etc/postfix/virtual (not posting the contents for obvious reasons) As for the aliases, that would be a no. But I have since added them :-) |
|
|||
|
wisptech wrote: > Right address: > chris@mydomain.com > Wrong address: > chris.mydomain.com@mail.mydomain.com > The unix username is chris.mydomain.com if that helps any. Ah, that's the reason... a most unusual UNIX user naming convention... Does your version of Postfix support pcre? (You can tell with "postconf -m".) You should be able to use a canonical map to correct the addresses. For example: --< /etc/postfix/main.cf >-- canonical_maps = pcre:/etc/postfix/canonical --< /etc/postfix/canonical >-- /(.*).mydomain.com@mydomain.com/ $1@mydomain.com Manually test with: postmap -q chris.mydomain.com@mydomain.com pcre:/etc/postfix/canonical -- Greg |
|
|||
|
> --< /etc/postfix/canonical >--
> /(.*).mydomain.com@mydomain.com/ $1@mydomain.com You are awesome!! That worked and addresses are now showing correctly in the headers and replies go where they are supposed to. Thanks again for the assistance. |