[BlueOnyx:06640] Re: Dovecot IMAP default

Michael Stauber mstauber at blueonyx.it
Tue Mar 8 12:37:06 -05 2011


Hi Jeffrey,

> Does anyone know how to configure Dovecot to use the user email address as
> the default email sender for that session rather than using
> apache at serverdomain.com?

This has nothing to do with Dovecot. Dovecot is just the daemon that provides 
POP3 and IMAP services. It doesn't send any mails, but provides an interface 
between the mailboxes on the system and the users email client(s).

Your problem is rather that your PHP script that send emails were coded by a 
slacker. There are a dozend common way how a PHP script can send emails. Some 
use native PHP functions for that, some use PEAR modules, some external 
libraries. In almost all of them the PHP script *can* set the sender address 
of the emails it sends. Your script apparently doesn't do that. So when your 
Sendmail then processes the email and finds that the mail doesn't have a 
sender address specified, it adds "apache@<server.name>" as sender as sort of 
a default.

So you'd have to look into your PHP script, find out what mail function it 
uses and have to adjust it to set a valid sender address.

Some people sometimes suggest to edit /etc/php.ini and to change the line ...

sendmail_path = /usr/sbin/sendmail -t -i

... to ...

sendmail_path = /usr/sbin/sendmail -t -i -f valid_mailbox at yourserver.com

... which will set the default sender address (if not specified elsewhere) to 
valid_mailbox at yourserver.com instead. But personally I think that's unwise, 
because messing with the server config because your PHP programmer created 
sub-optimal and sloppy code isn't really the way to do it.


-- 
With best regards

Michael Stauber
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.blueonyx.it/pipermail/blueonyx/attachments/20110308/b4ed4807/attachment.html>


More information about the Blueonyx mailing list