Re: [Mimedefang] calling system command

2011-01-08 Thread pete


Thanks to both responders.I understand now what the problems was. I 
will look into redirecting using aliases but on my test rig I used the 
following to get this working.


if ($Subject =~ /\brun ls \b/i) {
$cmd = ls;
$tmp = `$cmd`;
}

Pete.


On Sat, 8 Jan 2011 16:55:47 -0800 (PST), kd6...@yahoo.com wrote:

--- On Sat, 1/8/11, David F. Skoll d...@roaringpenguin.com wrote:

pete p...@nevill.uk.net wrote:

 I would like to call a system command when a specific subject 
string

 is passed.

 if ($Subject =~ /\run ls\b/i) {
     system(/bin/ls);
     }

 This works the first time when I send a mail with run ls in the
 subject line but causes mimedefang to crash.

The problem is that your filter *must not* print anything ...


Definently not good.  Look into sending the mail to a program instead
(cf. sendmail's aliases database - entries starting with |).

If using the aliases database, you may want to end the command with
an ||exit 0 just in case it fails - so a DSN isn't sent back to the
sender (unless you want errors to be reported).  There are some cases
(e.g. spamtraps feeding |spamassassin -k) that shouldn't DNS back 
on

errors.
___
NOTE: If there is a disclaimer or other legal boilerplate in the 
above

message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang



pain is temporary, glory is forever! 
Powered by Linux. www.linux.org

Scanned for viruses using ClamAV. www.clamav.net.


___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang


[Mimedefang] PGP encyption of outging email

2009-05-06 Thread pete

Hi, 

Is there a method for encrypting outgoing email using PGP (or other
methods). I am thinking of doing this on a per recipient basis. I.e encrypt
email to people I regularly email and leave plain the rest. 

Any suggestions or ideas welcome. 

Thanks, 

Pete.

pain is temporary, glory is forever! 
Powered by Linux. www.linux.org
Scanned for viruses using ClamAV. www.clamav.net.


___
NOTE: If there is a disclaimer or other legal boilerplate in the above
message, it is NULL AND VOID.  You may ignore it.

Visit http://www.mimedefang.org and http://www.roaringpenguin.com
MIMEDefang mailing list MIMEDefang@lists.roaringpenguin.com
http://lists.roaringpenguin.com/mailman/listinfo/mimedefang