Hello All,
I’ve just installed NethServer since it’s time to replace my aging ClearOS server.
How do I set up the POP3 Connect to operate in MultiDrop mode? I’ve seen these postings:
There is mention of a new MultiDrop feature in the POP3 Connector, but this doesn’t seem to have happened, will MultiDrop ever be implemented via the GUI?
Probably not in the coming days, but, as always, contributions are welcome.
The manual modifications needed are really simple and, given the low amount of requests for this feature, I think that using custom templates is the best way to “solve” the need.
Recap:
create an account in the pop3 connector interface, let’s say info@example.org
go to the command line and make it a multidrop
db getmail setprop info@example.org Retriever MultidropPOP3Retriever
The only difference with my working config is that I didn’t set the Account (I think it’s obvious, mails should go to different accounts).
Please, try to remove it:
I just did everything I listed above and the /var/lib/getmail/info@example.org.cfg file is there. I even removed it and signal-event re-created it.
I’m out of ideas.
That is strange.
Here’s the errors from /var/log/messages
Mar 22 17:02:55 nethserver esmith::event[7548]: ERROR in /etc/e-smith/templates-custom/getmailrc/20destination: Program fragment delivered error <<syntax error at /etc/e-smith/templates-custom/getmailrc/20destination line 10, near “$%(”>> at template line 4 Mar 22 17:02:55 nethserver esmith::event[7548]: ERROR: Template processing failed for //var/lib/getmail/hello@here.com.cfg: 1 fragment generated errors Mar 22 17:02:55 nethserver esmith::event[7548]: at /etc/e-smith/events/nethserver-getmail-update/S20nethserver-getmail-conf line 20. Mar 22 17:02:55 nethserver esmith::event[7548]: Action: /etc/e-smith/events/nethserver-getmail-update/S20nethserver-getmail-conf SUCCESS [0.113187]
This is contents of /etc/e-smith/templates-custom/getmailrc/20destination
destination]
type = MDA_external
path = /usr/libexec/dovecot/dovecot-lda
{
my $user = $account->prop(‘Account’) || ‘root’;
my ($name, $passwd) = getpwnam($user);
if ($name eq ‘’) {
$name = ‘root’;
}
$%(recipient) .= “arguments = (”-e","-d","$name")";
}
user = vmail
group = vmail
Good catch.
Discourse (the software powering this forum) ate one character in my post.
In the sed command, in front of $name there should be a backslash character (\).
Edit: discourse always eat backslashes.
sed -i “/OUT/s/\$name/%(recipient)/” /etc/e-smith/templates-custom/getmailrc/20destination
Delete the file, cp it again and re-run the sed command.
Note: I’m going to edit my post adding a second backslash.
Let’s see if it’s worth the shot… sed -i “/OUT/s/\\$name/%(recipient)/” /etc/e-smith/templates-custom/getmailrc/20destination
yep… ctrl+shift+c for use the syntax
OK, I’ve been trying to get GetMail working with multidrop, but I’m struggling. It’s probably best if I explain exactly what I’m trying to do.
I have 4 users: mum, dad, child1, child2
All the email goes into a single POP3 mail box at my ISP.
Each user has their own email address (e.g. mum@address.com, dad@address.com)
Every time we set up a new online account with a company, we give out a new email address (e.g. company1@address.com, company2@address.com, school@address.com, builders@address.com). My ISP allows me to drop emails sent to specific addresses, so if a company starts to send too much spam I can drop their emails.
I need to route all the unsorted emails to users mum & dad.
I then need to set up specific aliases so certain emails go to mum, e.g. school@address.com, and certain address go to dad, e.g. builders@address.com
I currently do all this with my ISP mail server by filtering the email into 4 different mailboxes and then downloading those mailboxes using FetchMail (to an old ClearOS server). I was hoping to be able to manage the whole thing using NethServer. Can I implement this using GetMail with mail aliases plus "domain accept unknown recipients"on Nethserver, or do I need to change my MX records to route mail directly to my Nethserver box and bypass my ISP mailserver (i.e. not use GetMail)?