[prev in list] [next in list] [prev in thread] [next in thread] 

List:       procmail
Subject:    procmailrc and forward to smtp
From:       SLK <test () d-w-d ! dk>
Date:       2004-03-29 23:51:57
Message-ID: 008e01c415e8$d247bfd0$980aa8c0 () minitahoo
[Download RAW message or body]

[Attachment #2 (multipart/alternative)]


Hello

My system is freebsd 4.9, sendmail, procmail, clamav/trashscan and spamassassin.

Is it possible to smtp forward a message from .procmail to a fixed smtp server

Example:

1. Mail is send to the system (to test@test.dk)
2. The mail is recived by the system and send to the local users .procmailrc
3. The .procmailrc start scanner for spam / virus
4. If the mail not contain spam or virus - the mail is send to test@test.dk on \
another mail server (smtp forward through the second mail server hostname)

(spam and virus i working - it is just the forward that is my problem)

-----------------------------------------------------------------------------------------------


My .procmailrc look like this: 

PATH=/bin:/usr/bin:/local/bin:/usr/local/bin
MAILDIR=$HOME/Mail
LOGFILE=$MAILDIR/procmail_log
LOCKFILE=$HOME/.lockmail

> 0fw
> /usr/local/bin/spamassassin
> 0
* ^X-Spam-Status: Yes
spam-mail

# 1. Run TrashScan
> 0
* multipart
* !^X-Virus-Scan:
> /usr/local/bin/trashscan

# 2. Filter tagged virus mails
> 0:
* ^X-Virus-Scan: Suspicious
mail.virus

----------------------------------------------------------------------------------------------


# Forward the email
> 0
!test@test.dk smtp:mail.second-mail-server.dk

I think it is something like this, but i will not work - can someone help my ?


/S.L.K


[Attachment #5 (text/html)]

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN">
<HTML><HEAD>
<META http-equiv=Content-Type content="text/html; charset=iso-8859-1">
<META content="MSHTML 6.00.2800.1400" name=GENERATOR>
<STYLE></STYLE>
</HEAD>
<BODY bgColor=#ffffff>
<DIV><FONT face=Arial size=2>
<DIV><FONT face=Arial size=2>Hello</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>My system is&nbsp;freebsd 4.9, sendmail, procmail, 
clamav/trashscan and spamassassin.</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Is it possible to smtp forward a message from 
.procmail to a fixed smtp server</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>Example:</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>1.&nbsp;Mail is send to the system (to <A 
href="mailto:test@test.dk">test@test.dk</A></FONT><FONT face=Arial 
size=2>)</FONT></DIV>
<DIV><FONT face=Arial size=2>2. The mail is recived by the system and send to 
the local users .procmailrc</FONT></DIV>
<DIV><FONT face=Arial size=2>3. The .procmailrc start scanner for spam / 
virus</FONT></DIV>
<DIV><FONT face=Arial size=2>4. If the mail not contain spam or virus - the mail 
is send to <A href="mailto:test@test.dk">test@test.dk</A> on another mail server 
(smtp forward through the second mail server hostname)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>(spam and virus i working - it is just the forward 
that is my problem)</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>-----------------------------------------------------------------------------------------------</FONT></DIV>
 <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>My .procmailrc look like this: </FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV>PATH=/bin:/usr/bin:/local/bin:/usr/local/bin<BR>MAILDIR=$HOME/Mail<BR>LOGFILE=$MAILDIR/procmail_log<BR>LOCKFILE=$HOME/.lockmail<BR><BR>:0fw<BR>| \
                
/usr/local/bin/spamassassin<BR>:0<BR>* ^X-Spam-Status: Yes<BR>spam-mail<BR><BR># 
1. Run TrashScan<BR>:0<BR>* multipart<BR>* !^X-Virus-Scan:<BR>| 
/usr/local/bin/trashscan<BR><BR># 2. Filter tagged virus mails<BR>:0:<BR>* 
^X-Virus-Scan: Suspicious<BR>mail.virus</DIV>
<DIV>&nbsp;</DIV>
<DIV><FONT face=Arial 
size=2>----------------------------------------------------------------------------------------------</FONT></DIV>
 <DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV># Forward the email<BR>:0<BR><A 
href="mailto:!test@test.dk">!test@test.dk</A> <FONT face=Arial 
size=2>smtp:mail.second-mail-server.dk</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>I think it is something like this, but i will not 
work - can someone help my ?</FONT></DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2></FONT>&nbsp;</DIV>
<DIV><FONT face=Arial size=2>/S.L.K</FONT></DIV></FONT></DIV></BODY></HTML>



_______________________________________________
procmail mailing list
procmail@lists.RWTH-Aachen.DE
http://MailMan.RWTH-Aachen.DE/mailman/listinfo/procmail


[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic