How can I temporarely modify sendmail from using Perl

Tertsi

Verified User
Joined
Mar 2, 2007
Messages
39
How can I temporarely modify what sendmail uses as the from e-mail address using Perl?

OS: CentOS
Control Panel: DirectAdmin

I know some instructions on how I could manually modify that, they are at: http://www.sendmail.org/tips/virtual-hosting.php (part 6 and 7).

However I need Perl to be able to modify it temporarely like I can with PHP by using:

ini_set(sendmail_from, '[email protected]');
ini_restore(sendmail_from);
 
Are you using a DirectAdmin server? If so, then DirectAdmin doesn't use sendmail; it has a link so references to sendmail are really references to exim, the MTA used by DirectAdmin.

It should work the same way, but I don't know how to do it from Perl.

Jeff
 
Yep using DirectAdmin, I guess I'll have to search for how to do it with exim then...
 
Actually I'd like to know how to manually set exim's from address of a given directadmin user level account so I'd get a clue on how to do it with perl.
 
There's an exim command line option (you can use it as a sendmail command line option as the latter is simply a link to the former) that'll tell exim to read the from address from the email. Then just set the from header inside the email you're piping to exim/sendmail.

Jeff
 
Back
Top