LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 02-16-2015, 06:57 AM   #1
okcomputer44
Member
 
Registered: Jun 2008
Location: /home/laz
Distribution: CentOS/Debian
Posts: 246

Rep: Reputation: 53
Postfix rewrite


Hello everybody!

I'm having some trouble with my Postfix server.

I have migrated my old working config to a new vps server and I can't send email with a proper header for some reason.

Google rejects the email because Postfix adds automatically X-Original-To: to the header which does not match with the sender address. So it goes to spam folder.

This drives me crazy, I have tried canonical maps, general maps, sender_canonical_maps
none of them helped.

Also I think it is not a spamfilter issue, I stopped spamassassin and didn't helped either.

I guess I'm missing some trivial configuration settings.
By the way Postfix are same version on both box, also system are CentOS on both VPS.

If any hints please help me out, thanks very much in advance!

Current config:

Quote:

alias_database = hash:/etc/aliases
alias_maps = hash:/etc/aliases
command_directory = /usr/sbin
config_directory = /etc/postfix
daemon_directory = /usr/libexec/postfix
data_directory = /var/lib/postfix
debug_peer_level = 2
default_privs = spamd
enable_original_recipient = yes
header_checks = regexp:/etc/postfix/header_checks
home_mailbox = Maildir/
html_directory = no
inet_interfaces = all
inet_protocols = all
mail_owner = postfix
mail_spool_directory = /var/spool/mail
mailbox_command = /usr/bin/procmail
mailq_path = /usr/bin/mailq.postfix
manpage_directory = /usr/share/man
message_size_limit = 50000000
mydestination = $mydomain, $myhostname, smtp.$mydomain, mail.$mydomain, /etc/postfix/domains, localhost, localhost.localdomain
mydomain = example.com
myhostname = mail.example.com
mynetworks = 127.0.0.0/8, my_VPS_IP
mynetworks_style = host
myorigin = $mydomain
newaliases_path = /usr/bin/newaliases.postfix
queue_directory = /var/spool/postfix
readme_directory = /usr/share/doc/postfix-2.6.6/README_FILES
receive_override_options = no_address_mappings
relay_domains = /etc/postfix/domains
sample_directory = /usr/share/doc/postfix-2.6.6/samples
sender_canonical_maps = regexp:/etc/postfix/sender_canonical
sendmail_path = /usr/sbin/sendmail.postfix
setgid_group = postdrop
smtp_tls_CAfile = /etc/postfix/ssl/ca.pem
smtpd_recipient_restrictions = permit_mynetworks,permit_sasl_authenticated,reject_unauth_destination,reject_unknown_client
smtpd_tls_CAfile = /etc/postfix/ssl/ca.pem
smtpd_tls_auth_only = no
smtpd_tls_cert_file = /etc/postfix/ssl/ca.crt
smtpd_tls_exclude_ciphers = RC4-MD5,RC4-SHA,DHE-RSA-CAMELLIA256-SHA
smtpd_tls_key_file = /etc/postfix/ssl/ca.key
smtpd_tls_loglevel = 2
smtpd_tls_received_header = yes
smtpd_tls_security_level = may
smtpd_tls_session_cache_database = btree:/var/lib/postfix/smtpd_tls_cache
smtpd_tls_session_cache_timeout = 3600s
smtpd_use_tls = yes
tls_random_source = dev:/dev/urandom
unknown_local_recipient_reject_code = 550
 
Old 02-16-2015, 03:50 PM   #2
okcomputer44
Member
 
Registered: Jun 2008
Location: /home/laz
Distribution: CentOS/Debian
Posts: 246

Original Poster
Rep: Reputation: 53
Smile

Hi,

Just some update regarding to my issue.

After finally I found in Virginmedia webmail the original header to check the full email structure and I found the issue.
On my old Hetzner VPS server the default route goes via IPv4, but on my new OVH VPS server it goes via IPv6.

Meaning the Postfix configuration use the IPv6 address instead of the IPv4, so obviously the reserve check against the zone wont match.

I used on the old server the config like this:
Quote:
inet_protocols = all
Then I changed it to:

Quote:
inet_protocols = ipv4
and voila it is fine now!

I hope it will help someone who has this issue.
This almost drove me mad, Virgin didn't tell me what the real issue was and I didn't see the full header to check it out.
Now it's all good!

Also some tools to check headers if you need:

https://toolbox.googleapps.com/apps/messageheader/

Last edited by okcomputer44; 02-16-2015 at 03:51 PM.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Rewrite sender address in postfix williebens Linux - Server 27 11-07-2014 05:29 AM
Postfix trivial-rewrite Problem csdhiman Linux - Server 0 02-20-2008 05:05 AM
Postfix Rewrite Destination Domain Name? doctorcisco Linux - Server 2 11-03-2007 11:02 AM
Postfix: Is it possible to rewrite sender address only for selective recipient? Akhran Linux - Software 3 08-15-2006 10:48 AM
postfix: forcing rewrite of 'To' address when sending imraven Linux - Software 4 06-15-2006 10:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 03:04 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration