[imp] sudo sendmail problem
Larry Fine
datavortex+sender+6bae77@datavortex.net
Sat Jul 13 22:44:20 PDT 2002
On Wed, Jun 19, 2002 at 02:52:31PM -0400, Data Vortex wrote:
> I am currently trying to configure imp to work in concert with my
> antispam local delivery agent (http://tmda.sf.net/). This requires that
> the sendmail wrapper be executed as the user sending the mail.
Before I launch into this, a quick word - a new version of tmda is being
released Monday which will include a proxying authenticated SMTP daemon to
handle outgoing mail. This release will alleviate the issues for most
users and will allow you to use tmda with imp without hacking on the core
of either one, but this hack may still be useful if you don't have SMTP
auth or don't want to run a new daemon or open another port.
I have come up with a solution to this problem. The fix is actually
pretty simple. I use my local system values:
-- Make sure sudo is setup on your system. Add the following to sudoers:
apache ALL= (ALL) NOPASSWD: /usr/bin/tmda-sendmail
-- Make sure $conf['mailer']['type'] = 'sendmail'
-- Edit horde/imp/lib/IMP.php, insert the following on line 1022 after
$params = $conf['mailer']['params']:
$params['sendmail_path'] = '/usr/bin/sudo';
$params['sendmail_args'] = ' -H -u ' .$imp['user']. '
/usr/bin/tmda-sendmail -t';
And you're done. One word of caution: this is only for systems where ALL
imp users are also tmda users. The sendmail wrapper will fail and return
the following error for users who do not have TMDA set up:
Can't find key file: ~/.tmda/crypt_key
You could probably generate a key and a default accept-all, tag-none setup
for all your users, if you wanted to.
Hope this helps someone.
-- DV
More information about the imp
mailing list