Linux - ServerThis forum is for the discussion of Linux Software used in a server related context.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
OK, i think I have an idea as to what is going on.. I think postfix is not linked with procmail properly and it is not executing .procmailrc file each time a mail comes through. it is simply being sent to squirrelmail. so heres the part of the postfix/main.cf file that links it to procmail:
Code:
mailbox_command = /usr/bin/procmail -Y -a $DOMAIN DEFAULT=$HOME/Maildir
MAILDIR= $HOME/Maildir
first, is this all it takes for the linkage.. If this is done correctly, here's what i think happens.. correct me if I'm wrong.
1. Mail comes into postfix, which sends it to /usr/bin/procmail and runs the procmail command. It assumes that the mail is sent, therefore does not do anything else (therefore, there should NOT be a nything in squirrelmail)
2. Procmail takes this and it executes $HOME/.procmailrc, which checks the email for the following conditions:
Lets say that the second condition (<25600) is met, then it gets sent to $HOME/Maildir/ where it will get stored.
If none of the conditions are met, then it sends back to postfix which sends it to squirrelmail.
Thats what I understand about this mechanism so far... Please correct me if I am wrong. THANK YOU soo much for you help so far.. I have been trying this for 3 days
Unless you want to create a unix user for each virtual user, then there's not much you can do with procmail (apart from operations which can be applied to everyone's mail, as in the link in my last post).
What is it you're trying to achieve with procmail anyway?
Righty .. extra packages and i agree with you. However i used to stress procmail quite alot until i got amavis up. As long as you can afford to spend some resources on it it's ok.
OK, I commented out all the lines that have to do with virtual, for example "virtual_mailbox_base", "virtual_alias_maps", etc.. and now the mail is being sent to command /usr/bin/procmail. However, the mail is being lost after that. When I do the command
Code:
procmail -m
It says that I have missing rc files. However, I have an rc file:
$HOME/.procmailrc
Where is procmail looking at to check for rc files??
procmail -m was merely from trial and error.. For the command "procmail", it did not do anything, but for "procmail -m" it was executing the .procmailrc file..
Now, the log file for procmail is working, so I know where the mail ends up.. They are all ending up in my $MAILDIR
However, I am unable to view it on my MUA. I am using squirrelmail. How do I configure it such that it is able to see the mail coming in through procmail?
squirrelmail is just a front-end to your IMAP server (just like Thunderbird, or Evolution) - you're probably running an IMAP server like 'dovecot', 'courier' or 'uw-imapd' or something similar. You'll have to configure this server to look in the right place for user mail.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.