LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   procmail (https://www.linuxquestions.org/questions/linux-software-2/procmail-36622/)

ccool 11-27-2002 12:08 PM

procmail
 
Hi,

I run fetchmail-sendmail-procmail... my goal was that I could foward user1@mydomain.com and user2@mydomain.com to email@isp.com

the foward works great, sendmail does its job, so does fetchmail, but procmail is not able to separate the mails from user1 and user2.

I run fetchmail as root, and the command I use is :
poll "pop.isp.com" proto pop3 user "isp-user-name" with pass "isp-passord" is "root" here forcecr smtpaddress localhost


and in my procmail I tried 2 things...

1 :
:0
* ^Touser1@mydomain.com
! user1@localhost


2:
:0
* ^[From|To|Cc].user1*@*mydomain.com
! user1@localhost

I tried 1, and then I tried 2, but none of them work... Is there something that I am forgetting???

PS: in #1, I also tried * ^To_user1@mydomain\.com but it did'nt work

acid_kewpie 11-27-2002 12:27 PM

well there's an awful lot of basic syntax errors there that should be fairly obvious from the procmailex man page. why did you get "\.com" come from??

i'd suggest making it a lot simpler, presumably you don't need to check the domain name, so only check the user name. you won't need to forard to the domain, the localhost should be assumed.

and where is this going? /root/.procmailrc i would presume. there might be some useful errors in your dmesg log.

ccool 11-27-2002 12:43 PM

I read 2 different Faq and mini-how-to about procmail and I used the exact same syntax..

yes the file was /root/.procmail ... I forgot to mention

I will try without the domain, so it would be :
:0
* ^Touser1
! user1


Is that right??? anyway, I will try this config, just to test

acid_kewpie 11-27-2002 12:58 PM

it seems ok, not sure if TO is any dfifferent to To though.

Quote:

yes the file was /root/.procmail ... I forgot to mention
.procmailrc???

ccool 11-27-2002 01:03 PM

sorry, my mistake, it was .procmailrc

maybe it's because I'm not concentrated enough...

ok, thanks a lot

ccool 11-27-2002 01:12 PM

Yes, it works...

my error was the TO and not To ... thanks,


All times are GMT -5. The time now is 03:37 AM.