Comments on: Setting up maildrop http://switch.richard5.net How to build your Mac into a internet server using open source software Tue, 17 Jun 2008 18:25:42 +0000 hourly 1 http://wordpress.org/?v=3.2.1 By: Richard5 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/comment-page-1/#comment-43947 Richard5 Sat, 13 Oct 2007 20:26:45 +0000 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/#comment-43947 @Dennis, No there is no need for a real password. This is not a security risk as there is also no shell access defined for that user. You could set the GID to 102, it would be neater but it doesn't really matter. I will correct it later ! Thanks. @Dennis, No there is no need for a real password. This is not a security risk as there is also no shell access defined for that user.

You could set the GID to 102, it would be neater but it doesn’t really matter. I will correct it later !

Thanks.

]]>
By: Dennis http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/comment-page-1/#comment-43945 Dennis Sat, 13 Oct 2007 20:13:02 +0000 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/#comment-43945 Silly question perhaps but should the * be replaced with an actual password? Also should --enable-maildrop-gid=27 be 102? sudo niutil -createprop / /users/vmail passwd "*" Silly question perhaps but should the * be replaced with an actual password? Also should –enable-maildrop-gid=27 be 102?

sudo niutil -createprop / /users/vmail passwd “*”

]]>
By: Richard5 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/comment-page-1/#comment-36772 Richard5 Mon, 20 Aug 2007 11:55:41 +0000 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/#comment-36772 Maildrop does not create maildir's you will need to add the creation of maildir's to your script to get this working. Maildrop in your current setup only works with existing maildirs. Maildrop does not create maildir’s you will need to add the creation of maildir’s to your script to get this working. Maildrop in your current setup only works with existing maildirs.

]]>
By: agnello http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/comment-page-1/#comment-36767 agnello Mon, 20 Aug 2007 10:48:58 +0000 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/#comment-36767 HI I have configured a mail server to use a maildrop as the MDA to deliver mails. my /etc/maildroprc file looks like this ############################################### # EXTENSION="$1" user="5" domain="$6" MAILHOME="/home/vmail/" DEFAULT="$MAILHOME/$domain/$user/Maildir" if (/^X-SPAM: Spam*/) { to "$MAILHOME/$domain/$user/Maildir/Junk" } else { to "$MAILHOME/$domain/$user/Maildir" ############################################### When i try to send create mail box using postfixadmin there is no error but the Maildir is created in /home/vmail instead of /home/vamil/domain.com/user1/ (here is the logs) ################################################ Aug 17 14:02:19 server3 clamd.amavisd[2152]: Database correctly reloaded (94464 viruses) Aug 17 14:17:00 server3 postfix/qmgr[6233]: 34FE237221: from=, size=421, nrcpt=1 (queue active) Aug 17 14:17:00 server3 postfix/qmgr[6233]: B1B1137154: from=, size=421, nrcpt=1 (queue active) Aug 17 14:17:00 server3 postfix/qmgr[6233]: 7617637155: from=, size=421, nrcpt=1 (queue active) Aug 17 14:17:00 server3 postfix/pipe[6401]: 34FE237221: to=, relay=maildrop, delay=1087, status=sent (newwork.asia) Aug 17 14:17:00 server3 postfix/qmgr[6233]: 34FE237221: removed Aug 17 14:17:00 server3 postfix/pipe[6403]: B1B1137154: to=, relay=maildrop, delay=1331, status=sent (newwork.asia) Aug 17 14:17:00 server3 postfix/qmgr[6233]: B1B1137154: removed Aug 17 14:17:00 server3 postfix/pipe[6404]: 7617637155: to=, relay=maildrop, delay=1227, status=sent (newwork.asia) Aug 17 14:17:00 server3 postfix/qmgr[6233]: 7617637155: removed ################################################################# my /etc/postfix/master.cf file looks like this ############################################################# # maildrop. See the Postfix MAILDROP_README file for details. # Also specify in main.cf: maildrop_destination_recipient_limit=1 maildrop unix - n n - - pipe flags=DRhu user=vmail argv=/usr/local/bin/maildrop /etc/maildroprc -d ${recipient} # ################################################################ could some onel pls help me as to why maildrop is not creating the maildir in the right location . -- Warm Regards Agnello . G .Dsouza HI
I have configured a mail server to use a maildrop as the MDA to deliver mails.

my /etc/maildroprc file looks like this
###############################################
#
EXTENSION=”$1″
user=”5″
domain=”$6″
MAILHOME=”/home/vmail/”
DEFAULT=”$MAILHOME/$domain/$user/Maildir”

if (/^X-SPAM: Spam*/)
{
to “$MAILHOME/$domain/$user/Maildir/Junk”
}
else
{
to “$MAILHOME/$domain/$user/Maildir”

###############################################

When i try to send create mail box using postfixadmin there is no
error but the Maildir is created in /home/vmail instead of
/home/vamil/domain.com/user1/

(here is the logs)
################################################
Aug 17 14:02:19 server3 clamd.amavisd[2152]: Database correctly
reloaded (94464 viruses)
Aug 17 14:17:00 server3 postfix/qmgr[6233]: 34FE237221:
from=, size=421, nrcpt=1 (queue active)
Aug 17 14:17:00 server3 postfix/qmgr[6233]: B1B1137154:
from=, size=421, nrcpt=1 (queue active)
Aug 17 14:17:00 server3 postfix/qmgr[6233]: 7617637155:
from=, size=421, nrcpt=1 (queue active)
Aug 17 14:17:00 server3 postfix/pipe[6401]: 34FE237221:
to=, relay=maildrop, delay=1087, status=sent
(newwork.asia)
Aug 17 14:17:00 server3 postfix/qmgr[6233]: 34FE237221: removed
Aug 17 14:17:00 server3 postfix/pipe[6403]: B1B1137154:
to=, relay=maildrop, delay=1331, status=sent
(newwork.asia)
Aug 17 14:17:00 server3 postfix/qmgr[6233]: B1B1137154: removed
Aug 17 14:17:00 server3 postfix/pipe[6404]: 7617637155:
to=, relay=maildrop, delay=1227, status=sent
(newwork.asia)
Aug 17 14:17:00 server3 postfix/qmgr[6233]: 7617637155: removed

#################################################################
my /etc/postfix/master.cf file looks like this

#############################################################
# maildrop. See the Postfix MAILDROP_README file for details.
# Also specify in main.cf: maildrop_destination_recipient_limit=1
maildrop unix – n n – – pipe
flags=DRhu user=vmail argv=/usr/local/bin/maildrop /etc/maildroprc
-d ${recipient}
#
################################################################

could some onel pls help me as to why maildrop is not creating the
maildir in the right location .


Warm Regards

Agnello . G .Dsouza

]]>
By: James http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/comment-page-1/#comment-31697 James Mon, 02 Jul 2007 07:57:09 +0000 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/#comment-31697 Set things up as per docs, but I get: Jul 2 17:49:34 mail-bordo-com-au postfix/qmgr[487]: 652C6A54432: removed Jul 2 17:49:46 mail-bordo-com-au postfix/qmgr[487]: warning: connect to transport maildrop: Connection refused Jul 2 17:49:56 mail-bordo-com-au authdaemond: stopping authdaemond children Jul 2 17:49:57 mail-bordo-com-au pop3d: Connection, ip=[::ffff:58.170.149.36] Authdaemond is running. Also get: Jul 2 17:56:03 mail-bordo-com-au imapd-ssl: Failed to create cache file: maildirwatch (peter.psarros@bordo.com.au) Jul 2 17:56:03 mail-bordo-com-au imapd-ssl: Error: Permission denied Don't know what I've done. Any ideas? Thanks, James. Set things up as per docs, but I get:

Jul 2 17:49:34 mail-bordo-com-au postfix/qmgr[487]: 652C6A54432: removed
Jul 2 17:49:46 mail-bordo-com-au postfix/qmgr[487]: warning: connect to transport maildrop: Connection refused
Jul 2 17:49:56 mail-bordo-com-au authdaemond: stopping authdaemond children
Jul 2 17:49:57 mail-bordo-com-au pop3d: Connection, ip=[::ffff:58.170.149.36]

Authdaemond is running.

Also get:

Jul 2 17:56:03 mail-bordo-com-au imapd-ssl: Failed to create cache file: maildirwatch (peter.psarros@bordo.com.au)
Jul 2 17:56:03 mail-bordo-com-au imapd-ssl: Error: Permission denied

Don’t know what I’ve done. Any ideas?

Thanks, James.

]]>
By: Chris http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/comment-page-1/#comment-17539 Chris Mon, 19 Feb 2007 20:03:44 +0000 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/#comment-17539 New insight viz. #1: Put VERBOSE="5" in your mailfilter and look in awe at /var/log/mail.info whenever your maildrop goes aboogie :) (it might help, but still..) And: If you're looking at making a per user setup, try something like this (works for me): `test -f $MAILHOME/mailfilters/${USER}@${HOST}` if ( $RETURNCODE == 0 ) { #log " == User $USER has own mailfilter, including $MAILHOME/mailfilters/${USER}@${HOST} ..." include "$MAILHOME/mailfilters/${USER}@${HOST}" } near the end but don't forget a to "$MAILHOME/$HOST/$USER/" after that. This assumes all individualized mailfilters in $MAILHOME/mailfilters/user@domain.tld ... (again: doesn't work if shell is bin/false, at least on this end of things) Cheers Chris New insight viz. #1:

Put

VERBOSE=”5″

in your mailfilter and look in awe at /var/log/mail.info whenever your maildrop goes aboogie :)

(it might help, but still..)

And: If you’re looking at making a per user setup, try something like this (works for me):

`test -f $MAILHOME/mailfilters/${USER}@${HOST}`
if ( $RETURNCODE == 0 )
{
#log ” == User $USER has own mailfilter, including $MAILHOME/mailfilters/${USER}@${HOST} …”
include “$MAILHOME/mailfilters/${USER}@${HOST}”
}

near the end but don’t forget a

to “$MAILHOME/$HOST/$USER/”

after that.

This assumes all individualized mailfilters in $MAILHOME/mailfilters/user@domain.tld …
(again: doesn’t work if shell is bin/false, at least on this end of things)

Cheers
Chris

]]>
By: Richard5 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/comment-page-1/#comment-17535 Richard5 Mon, 19 Feb 2007 19:36:39 +0000 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/#comment-17535 I agree on the first, it's a dog.. The second explains why didn't get it working, thanks for that. I haven't tried the 3rd but will give it a go later on. I hope someone else will give us some insights on the security angle. I agree on the first, it’s a dog.. The second explains why didn’t get it working, thanks for that. I haven’t tried the 3rd but will give it a go later on. I hope someone else will give us some insights on the security angle.

]]>
By: Chris http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/comment-page-1/#comment-17530 Chris Mon, 19 Feb 2007 17:28:45 +0000 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/#comment-17530 Thanks for this. Btw: I just figured out why my setup didn't work (meaning: mailfilter not working). First of all, mailfilter's a pain to debug. 2ndly: the logfile arg does take a full path (e.g. /var/log/maildrop.info otl) and writes to it if its owned by e.g. vmail|virtual|whatever your vuser is called. Which is great. 3rdly (and what took me hours to figure out): if you follow this guide and others on the net, you have wisely given let's say vmail the /bin/false shell. However, if you decide to e.g `test -d $DEFAULT` if ( $RETUNRCODE != 0) { # do something } this ends up always being called since test cannot return TRUE! My solution was to put SHELL="/bin/sh" # or what flavour have you on top of the global mailfilterrc. I don't know if this opens up a whole bunch of security issues, though. Any insights on this? Thought I'd share this.. Thx Chris Thanks for this.

Btw: I just figured out why my setup didn’t work (meaning: mailfilter not working).

First of all, mailfilter’s a pain to debug.
2ndly: the logfile arg does take a full path (e.g. /var/log/maildrop.info otl) and writes to it if its owned by e.g. vmail|virtual|whatever your vuser is called. Which is great.

3rdly (and what took me hours to figure out): if you follow this guide and others on the net, you have wisely given let’s say vmail the /bin/false shell. However, if you decide to e.g

`test -d $DEFAULT`
if ( $RETUNRCODE != 0) { # do something }

this ends up always being called since test cannot return TRUE!

My solution was to put

SHELL=”/bin/sh” # or what flavour have you

on top of the global mailfilterrc.

I don’t know if this opens up a whole bunch of security issues, though. Any insights on this?

Thought I’d share this..
Thx
Chris

]]>
By: James http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/comment-page-1/#comment-8625 James Mon, 04 Dec 2006 23:42:37 +0000 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/#comment-8625 OK. I look forward to do your docs when you figure it out! For some reason the changes that I started to make stopped me being able to retrieve my mail. Don't know why it would say user unknown. Anyway, all seems to be OK now. OK. I look forward to do your docs when you figure it out!

For some reason the changes that I started to make stopped me being able to retrieve my mail. Don’t know why it would say user unknown. Anyway, all seems to be OK now.

]]>
By: Richard5 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/comment-page-1/#comment-8591 Richard5 Mon, 04 Dec 2006 12:14:59 +0000 http://switch.richard5.net/isp-in-a-box-v2/setting-up-maildrop/#comment-8591 No don't do this or you will receive everyone's mail. I'm looking into a per user setup but haven't quite found out how to do this in an easy way. PS your mail is being bounced, user unknown ! No don’t do this or you will receive everyone’s mail. I’m looking into a per user setup but haven’t quite found out how to do this in an easy way.

PS your mail is being bounced, user unknown !

]]>