PDA

View Full Version : procmail and mojomail working together?



alien
05-06-2003, 10:19 PM
I've set up mojomail, but I'd like to configure a list that doesn't require people to go through a web interface. I want members of the list to be able to send messages to listname@domain.net and have that go to everyone on the list.

The obvious process for this is procmail, but the method described in the mojomail documentation doesn't work... as near as I can tell because I haven't got procmail working. There seems to be some magic on Westhost's configuration I haven't figured out.

My .procmailrc has just

:0
* ^[TO|CC].*listname
|/home/domain/bin/mojo_send.pl
with suitable names included, of course, but that's giving me neither the result I want nor any useful error message.

Maybe my subject should just be procmail working?

TIA for any help,
____________
Tom von Alten
tva@fortboise.org

WestHost - CSimiskey
05-09-2003, 11:00 AM
To make the group list function you have to do a few things before the .procmailrc.

In /www/accountname/mojo/extensions/mojo_send.pl, edit this line to match your path:

$lib = '/www/accountaname/cgi-bin/mojo';

Once you have that, THEN work on your .procmailrc and make it match this, changing the mailling list name as appropriate. Remember that the mailling list name needs to be the Short Name of the list. You can check this by viewing the Change List Information page, but you cannot change the Short Name.


#Preliminaries
MAILDIR=${HOME}/mail #First check what your mail directory is!
LOGFILE=${MAILDIR}/procmail.log
LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "

:0
* ^[TO|CC].*listname
|${HOME}/www/cgi-bin/mojo/extensions/mojo_send.pl"

# Accept all the rest to your default mailbox
:0:
${DEFAULT}

Hopefully that will get you up and running the way you need to be. It has been tested on my own account and worked well.

alien
05-09-2003, 09:38 PM
Thanks for the reply. I see that when Westhost installed mojomail over the top of what I had done on my own, the location of mojo_send.pl changed, and the pointer within mojo_send.pl was incorrect. Once I fixed that, the fun began!

I wasn't sure what to do with this:

MAILDIR=${HOME}/mail #First check what your mail directory is!
LOGFILE=${MAILDIR}/procmail.log
LOG="--- Logging ${LOGFILE} for ${LOGNAME}, "

as I can't imagine I could make that file in /var/spool/mail/ could I? I imagine that's shared with others on the machine (but can't know, as I don't have permissions to list the directory).

Anyway, with just the pipe to mojo_send.pl, I was successful in having my mail routed via .procmailrc into the program, but perhaps a little too successful - I created a mailloop, and frantically tried to shut it down before I swamped one or another system. With the .pl scripts chmod'd -x, .procmailrc seemed capable of doing it on its own.

As a further clue, one of the header lines was getting appended each time:


Content-Type: text/plain;
charset="Windows-1252"; charset=iso-8859-1; charset=iso-8859-1; charset=
iso-8859-1;

etc.

Does ".redirect" get done first, and then whatever drops through goes through .procmailrc?

I'm confused and loopy now, yuk.

alien
05-09-2003, 10:11 PM
Whew, I think I got it worked out. My .procmailrc was still pointing to my (installed earlier, on my own) copy of mojo_send.pl, which had the $lib pointer correct. The remaining mystery is why procmail wasn't working before, because it all seems simpler right now. I'm not going to figure that out after the thrashing I did this evening.

Here's all that was required in .procmailrc -- note the addition to prevent looping by filtering out based on a header line that mojo_send.pl adds:


:0
* ^[TO|CC].*listshortname
* ! ^List: listshortname
|/path-to-script/mojo_send.pl


I don't need the MAILDIR spec, nor the final recipe to deliver to the default mailbox - procmail does that with things that drop through to the bottom anyway. This will leave a copy of list messages in the default maildrop, since the first loop will get rejected by this recipe and fall through.

Thanks for prompting me to figure it out! (If you have any advice on why I ran into a loop problem, which I assume others didn't, I'd be happy to hear it.)

rbll
07-13-2003, 01:10 AM
Thanks to all the info here, I am able to get mojo/redirects/etc working
ALMOST the way I need ...

What I can do is make it so that any arbitrary person can send email
to a Mojo list as blahlist@mydomain ...

How can I do that ? Right now, I get the "Not allowed to post" message
back .....

alien
07-13-2003, 11:44 AM
What I can do is make it so that any arbitrary person can send email
to a Mojo list as blahlist@mydomain ...

It's mojo that's not letting you do that. I didn't see any way to override it in a quick look through the configuration options.

rbll
07-13-2003, 12:16 PM
What I actually meant is that I CAN'T get it to work so that anyone
can send to mylist@mydomain ....

I can't find it in the options either Tom ...

Anyone know if you can do it somehow ?

I run a Little League and I need the lists for things like the board
of directors and people in the league need to be able to send us
email .....

Thanks

alien
07-13-2003, 01:26 PM
Maybe this is a job that could be handled more simply with something besides mojo. Westhost accounts have a simple email list functionality,
where you can just put a bunch of addresses in a plain text file, in your $HOME/maillists directory, and the name of the file is the address on your domain.

That acts as simple forwarding - anyone mails to list@yourdomain and the message is sent out to everyone on the list. No invites/subscriptions/archives/web interface, etc.

rbll
07-14-2003, 10:17 PM
Thats what I have been using (~/maillists) and we have complaints
from a lot of people that they don't get some of the emails ....

Westhost support's answer to that issue was to move to Mojo ....