Any Postfix people on here?

I set up a new server with Postfix as the mail server and I am seeing some issues with the email headers.  Not sure where I went wrong, the last time I set up Postfix, the headers were correct.  Unfortunately, that old configuration is gone; the server has been decommissioned and I did not save a copy of the Postfix configs.

Geeks, making the world a better place
Quote · 1 Jun 2014

can you explain exactly whats wrong?

so much to do....
Quote · 1 Jun 2014

I have set up a no-reply user with a proper mailbox to handle any emails that are rejected or where the user may actually reply to the no-reply from address.  In my email client I am not seeing a proper From: in the header.

In the email client, I see a blank for the From address

In the headers I see:

From: =?UTF-8?B?U2htb296ZVpvbmUuY29t?= 

Plus, for some reason emails sent out don't seem to have the proper Mime type or encoding.  On my old server, which was also CentOS 6.5, Postfix, I had no problems receiving emails attachments but now I simply get the your client does not support; I know this is not the client but Postfix.

So what steps can I take to correct this?  I have set up Posfix mail server several times but there is still a lot of the configuration I don't understand and most of the time I have to bang it around a bit to get it working.  Something isn't quite right with the configuration.

Geeks, making the world a better place
Quote · 2 Jun 2014

Maybe this helps, it also helped me.

http://www.boonex.com/forums/topic/MIME-Version-1-0-From-at-top-of-all-emails-How-to-fix-.htm

Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81
Quote · 2 Jun 2014

 

Maybe this helps, it also helped me.

http://www.boonex.com/forums/topic/MIME-Version-1-0-From-at-top-of-all-emails-How-to-fix-.htm

The article was incomplete.  However, it would seem to indicate that I don't need to chase Postfix but Dolphin on this.  In the article it talked about removing the \r from the Dolphin code.  However, I decided to go searching on the net to see what I could find.  What I found was that most were saying that the code should be something along the lines of:

$headers = 'MIME-Version: 1.0' . "\r\n";

The article you pointed to was old, 2011 and I need to go see what is in the current code; but it was illustrating that Dolphin is:

$sMailHeader = "MIME-Version: 1.0\r\n" . $sMailHeader;

So following what I found we want:

$sMailHeader = "MIME-Version: 1.0" . "\r\n" . $sMailHeader;

From what I read, it is a question of getting php to properly parse things.  I might try this and see what happens.  Someone else on here was having problems with attachments to emails.  However, things were working properly on the old server but I am not sure when I upgraded to 7.1.1 so maybe what I am recalling working was 7.1.0 and the upgrade is part of my issue.

 

edit: I also upgraded php when I went to the new server, it was only a minor point release; from php 5.4.24 to php 5.4.27.

 

Geeks, making the world a better place
Quote · 2 Jun 2014

separate reply instead of edit:

Could it be the hyphen in the from email address?  Does Dolphin encode the From address?

I was doing some more research when someone asked on an article:

"But how do you encode the Headers "From:" field if it contains Unicode characters ?"

The answer was:

For the from field, like the subject, you have to base64_encode it !

// $from is expeditor

if(ereg("(.*)<(.*)>", $from, $regs)){
   // There is a name for the expeditor !
   $from ='=?UTF-8?B?'.base64_encode($regs[1]).'?= <'.$regs[2].'>';
}else{
   // Nothing to do, the from is directly the email !
   $from = $from;
}

// then :

$header ='From: '.$from.chr(10);


However, I sent out emails on the old server and the From: was properly sent.

Geeks, making the world a better place
Quote · 2 Jun 2014

I can only tell you that i had the exact same problems with "some" email providers when using \r\n. After switching just to \n everything with the headers was fine. Just try it.

Check my GeoDistance, Watermark, TorBlock and Android Push Notifications mods | http://goo.gl/H3Vp81
Quote · 3 Jun 2014

 

I can only tell you that i had the exact same problems with "some" email providers when using \r\n. After switching just to \n everything with the headers was fine. Just try it.

Yes, however, isn't it better to identify the nature of the problem so that Boonex can fix it; if that is indeed the problem.  I have looked at a lot of php mail functions around the net and they are showing what I illustrated above; separate "\r\n" so the first step I will do is to write it as others are writing it and see if that is the cause of the problem.

Geeks, making the world a better place
Quote · 3 Jun 2014

Question, should I set:

default_charset = "UTF-8"

in my php.ini?  Currently I don't.

Geeks, making the world a better place
Quote · 3 Jun 2014
 
 
Below is the legacy version of the Boonex site, maintained for Dolphin.Pro 7.x support.
The new Dolphin solution is powered by UNA Community Management System.