Link to home
Start Free TrialLog in
Avatar of jgla
jgla

asked on

mailproto syntax

How do you create a FORWARD using pmproto? I was told pmproto is a program that simplifies the management of "recipes" for forwarding, foldering, etc. It is supposed to create the appropriate .forward and .procmailrc files.

I've created a file .mailproto with simply - FORWARD { myname@domain.com | hisname@domain.com} in it. Whare's my syntax wrong or what else have I done wrong?
Avatar of seedy
seedy

What is that you want to do?  
To forward all mails that were sent from 'A@some.net' to 'B@another.net', place the following line in .mailproto
    FORWARD FROM A@some.net B@another.net

To forward all mails addressed to 'A@some.net' to 'B@another.net', place the following line in .mailproto
    FORWARD TO A@some.net B@another.net

And then run pmproto to process these commands.
Following is a snippet from the man pages:

FORWARD to www myself@somewhereelse.com
    All  mail  with a To address matching "www" will be
    forwarded to another address.

FORWARD to sales partner@bighouse.com
     All mail with a To address matching "sales" will be
     forwarded to another address.

FORWARD from boss@whitehouse.gov ceo@something.com
     All    mail    with   a   From   address   matching
     "boss@whitehouse.gov" will be forwarded to  another
     address("ceo@something.com").
Avatar of jgla

ASKER

I made a file in notepad like this
FORWARD TO joe@domain.com joe@company.com
, the renamed to .mailproto, then ftp'ed to proper directory. Then used telnet to run pmproto. I'm still not getting the forward. Any suggestions?




Avatar of jgla

ASKER

I made a file in notepad like this
FORWARD TO joe@domain.com joe@company.com
, the renamed to .mailproto, then ftp'ed to proper directory. Then used telnet to run pmproto. I'm still not getting the forward. Any suggestions?




What was the output/display when you run pmproto?
pmproto expects the file '.mailproto' to be present in your home directory.  Verify this by executing the following command on your unix host.

   $ cd
   $ cat .mailproto

Avatar of jgla

ASKER

when I run pmproto I get
'/usr/home/myname/.mailproto...
done'

When I try $ cd or $ cat .mailproto I get 'command not found' or 'undefined variable'

when I type 'more .mailproto' I get the contents of the file. they read: 'FORWARD TO hisname@domain.com hername@domain.com'

I created the file in Notepad and used an FTP client to upload it. When I read it the first time using telnet it had changed so I edited it using VI. Don't know if this fact is involved.
Avatar of jgla

ASKER

I've almost got it - I think. I changed the 'TO' to lower case and it appeared to work. I need to know if this leaves a copy in the mailbox - I need the command that forwards, then cleans it out of the mailbox.
No, this does not leave a copy in the in(mail)box.
Avatar of jgla

ASKER

So I'm ready to concede my 435 points. Last thing - I probably need to to set up for any realistic combination of case mistakes right? Like me@mysite.com and Me@mysite.com and Me@Mysite.com, right?

Thanks, jgla
ASKER CERTIFIED SOLUTION
Avatar of seedy
seedy

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial