LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 07-24-2014, 12:55 PM   #1
linoskoczek
LQ Newbie
 
Registered: Jul 2013
Location: Poland
Posts: 7

Rep: Reputation: Disabled
Changing headers to ALL outgoing mails


Hi!

I've got a service which makes e-mail aliases. It works in that way:

joseph@gmail.com sends e-mail to george@mysite.com
george@mysite.com is an alias to george@gmail.com so george@gmail.com receives an e-mail

Other example:
joseph@mail.com -> george@mysite.com -> george@mail.com

The problem starts when joseph@mail.com sends e-mail to george@mysite.com. joseph@mail.com receives error message with an error:
Quote:
[...]
Action: failed
Status: 5.0.0
Remote-MTA: dns; mxx.xxx.xxx
Diagnostic-Code: smtp; 550 Bad SPF records for [xxx.xxx:11.11.11.11], see
http://spf.pobox.com/
So I think I need to change header of every outcoming mail from mysite.com, so it would look like mysite.com sends all the messages. I've got postfix. How could I do it? I was reading a bit about header_checks, but I don't really know how to use it. I would also like to edit body of the message a bit to say "e-mail aliased by mysite.com blablabla".

I hope you will find a solution for me,
linoskoczek
 
Old 07-25-2014, 06:53 AM   #2
vishesh
Member
 
Registered: Feb 2008
Distribution: Fedora,RHEL,Ubuntu
Posts: 661

Rep: Reputation: 66
I think you should do some sort of address rewriting http://www.postfix.org/ADDRESS_REWRITING_README.html

Thanks
 
Old 07-25-2014, 02:35 PM   #3
YankeePride13
Member
 
Registered: Aug 2012
Distribution: Ubuntu 10.04, CentOS 6.3, Windows 7
Posts: 262

Rep: Reputation: 55
I'm not 100% sure, but I think the error you're seeing means that mysite.com won't accept e-mail from any domain that doesn't have an SPF record set up. In order to fix that, the DNS admin for mail.com would have to create an SPF record.
 
Old 07-25-2014, 02:42 PM   #4
linoskoczek
LQ Newbie
 
Registered: Jul 2013
Location: Poland
Posts: 7

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by vishesh View Post
I think you should do some sort of address rewriting http://www.postfix.org/ADDRESS_REWRITING_README.html

Thanks
Thank you for your answer.

I've already done it with header_checks.

To /etc/postfix/main.cf I've added:
Code:
header_checks = regexp:/etc/postfix/header_checks
I made a file /etc/postfix/header_checks and added that:
Code:
/^From: .+/ REPLACE From: mymail@mysite.com
It works, but it isn't solution for my problem.

Quote:
Originally Posted by YankeePride13 View Post
I'm not 100% sure, but I think the error you're seeing means that mysite.com won't accept e-mail from any domain that doesn't have an SPF record set up. In order to fix that, the DNS admin for mail.com would have to create an SPF record.
Thank you for your answer.

Hmm, I didn't even think about it, but it may be easy solution. I need to check it now!
 
  


Reply



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
[SOLVED] QMail routing outgoing mails guna_pmk Linux - Server 10 07-07-2011 04:51 AM
Count Outgoing mails sushantchawla2005 Linux - Server 3 10-15-2009 09:50 PM
logging outgoing mails in mailserver????? nics Linux - Server 17 01-01-2009 05:19 AM
No outgoing mails (Hacking ???) bittus Linux - Newbie 8 03-21-2008 08:48 AM
backing going up of outgoing mails in our mailserver??? nics Linux - Server 3 04-19-2007 11:48 PM

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

All times are GMT -5. The time now is 10:16 AM.

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