0

I've set up an exim4 server for sending email only on Debian Sid.

If I just send an email it works fine and the email is delivered in my inbox. However, if I send an email using WordPress it is delivered in my spam box.

I think this is caused by:

envelope-from <[email protected]>
Return-Path: [email protected]
From: WordPress <[email protected]>

The headers don't match. Could this cause this problem? Note the difference between example.com and example2.com.

I've tried setting the following line in exim4's configuration but it doesn't help (the headers are not changed):

Of course I've restarted exim4 after that.

MAIN_TRUSTED_USERS = uucp : www-data
[...]
trusted_users = MAIN_TRUSTED_USERS
untrusted_set_sender = *

I've set SPF records:

These may not have been resolved yet, could this be the problem?

example.com:  "v=spf1 ptr -all"
example2.com: "v=spf1 include:example.com -all"

WordPress should use the -f parameter for sendmail because it uses the PHPMailer class which does so by default. However, I would like to solve this at exim4's level (possibly use the From header for envelope-from and Return-Path).

I don't care if other users can send emails from another email address too, because www-data is basically the only user on this server.

If you need any more information please ask me.


I added the following lines:

local_from_check = false
local_sender_retain = true
untrusted_set_sender = *

But it's still not working.

1 Answer 1

1

WP should be configured to send messages via SMTP protocol. Usually local submission performed via socket/LMTP where local user the web-server owner is used as sender. When it is the www@localhost MTAs become very strict.

3
  • Yes, but that check should be disabled by the last 3 configuration options I posted, but it doesn't work. Basically my question is: is it possible to let exim reuse the email address of the From header for the envelope-from header? Jun 27, 2014 at 12:47
  • Sure you can check the presence of the envelope-from header and then invoke header_add from some ACL.
    – Kondybas
    Jun 27, 2014 at 13:08
  • Nevermind, I just figured this is not even my problem. Just sent an email via the command line which does set the right headers, but Hotmail still marks it as spam (even though it says spf=pass, X-AUTH-Result: PASS, X-SID-Result: PASS). I'll just try again tomorrow, thank you for your help. Jun 27, 2014 at 13:13

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .