Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 3 > Installation/Configuration

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 27th June 2011, 10:05
labanczjoe labanczjoe is offline
Junior Member
 
Join Date: Jun 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default autoreply, mail filter, custom rules, send copy can't work

Hello!


Sorry for my english. I have installed an Ispconfig 3 server. Ubuntu 10.4 - perfect server installer.
Everything works fine - all main (send/receive) mail functions. Courier imap + maildrop.

But if i create a mail filter (CC) , autoresponder, send copy the /var/mail/mailfilters/mydomain.hu/username/.mailfilter ... ,autoresponder files are created but cannot work.

Please help me!

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 28th June 2011, 09:40
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,715 Times in 2,557 Posts
Default

Are there any errors in your mail log (in the /var/log/ directory)?
__________________
Falko
--
Download the ISPConfig 3 Manual! | Check out the ISPConfig 3 Billing Module!

FB: http://www.facebook.com/howtoforge

nginx-Webhosting: Timme Hosting | Follow me on:
Reply With Quote
  #3  
Old 28th June 2011, 09:54
labanczjoe labanczjoe is offline
Junior Member
 
Join Date: Jun 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Thanks Your fast reply!

There are no errors. There are cc rule, send copy to the teszt user but nothing happens if I send an email to the test user.

Jun 28 09:42:34 ledobjuk postfix/qmgr[6088]: C49CE58C31AE: from=<joe@mydomain.hu>, size=1094, nrcpt=1 (queue active)
Jun 28 09:42:34 ledobjuk amavis[22298]: (22298-16) Passed CLEAN, [my.domain.ip.addr] [my.domain.ip.addr] <joe@mydomain.hu> -> <teszt@mydomain.hu>, Message-ID: <4E0985EA.9020300@mydomain.hu>, mail_id: O-6CN7c7NYRP, Hits: -2.899, size: 614, queued_as: C49CE58C31AE, 179 ms
Jun 28 09:42:34 ledobjuk postfix/smtp[21288]: 99B1758C31A7: to=<teszt@mydomain.hu>, relay=127.0.0.1[127.0.0.1]:10024, delay=0.2, delays=0.01/0/0/0.18, dsn=2.0.0, status=sent (250 2.0.0 Ok, id=22298-16, from MTA([127.0.0.1]:10025): 250 2.0.0 Ok: queued as C49CE58C31AE)
Jun 28 09:42:34 ledobjuk postfix/qmgr[6088]: 99B1758C31A7: removed
Jun 28 09:42:34 ledobjuk postfix/pipe[23227]: C49CE58C31AE: to=<teszt@mydomain.hu>, relay=maildrop, delay=0.02, delays=0/0/0/0.01, dsn=2.0.0, status=sent (delivered via maildrop service)
Jun 28 09:42:34 ledobjuk postfix/qmgr[6088]: C49CE58C31AE: removed


Joe
Reply With Quote
  #4  
Old 30th June 2011, 11:03
labanczjoe labanczjoe is offline
Junior Member
 
Join Date: Jun 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Maybe a postfix problem? Maybe user rights? Any idea?
Reply With Quote
  #5  
Old 30th June 2011, 14:06
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,340
Thanks: 810
Thanked 5,171 Times in 4,055 Posts
Default

Please post the content of the postfix master.cf file and the content of the /var/vmail/.mailfilter file.
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #6  
Old 30th June 2011, 14:19
labanczjoe labanczjoe is offline
Junior Member
 
Join Date: Jun 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Till!

master.cf:
#
# Postfix master process configuration file. For details on the format
# of the file, see the master(5) manual page (command: "man 5 master").
#
# Do not forget to execute "postfix reload" after editing this file.
#
# ================================================== ========================
# service type private unpriv chroot wakeup maxproc command + args
# (yes) (yes) (yes) (never) (100)
# ================================================== ========================
smtp inet n - - - - smtpd
#submission inet n - - - - smtpd
# -o smtpd_tls_security_level=encrypt
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
# -o milter_macro_daemon_name=ORIGINATING
#smtps inet n - - - - smtpd
# -o smtpd_tls_wrappermode=yes
# -o smtpd_sasl_auth_enable=yes
# -o smtpd_client_restrictions=permit_sasl_authenticate d,reject
# -o milter_macro_daemon_name=ORIGINATING
#628 inet n - - - - qmqpd
pickup fifo n - - 60 1 pickup
cleanup unix n - - - 0 cleanup
qmgr fifo n - n 300 1 qmgr
#qmgr fifo n - - 300 1 oqmgr
tlsmgr unix - - - 1000? 1 tlsmgr
rewrite unix - - - - - trivial-rewrite
bounce unix - - - - 0 bounce
defer unix - - - - 0 bounce
trace unix - - - - 0 bounce
verify unix - - - - 1 verify
flush unix n - - 1000? 0 flush
proxymap unix - - n - - proxymap
proxywrite unix - - n - 1 proxymap
smtp unix - - - - - smtp
# When relaying mail as backup MX, disable fallback_relay to avoid MX loops
relay unix - - - - - smtp
-o smtp_fallback_relay=
# -o smtp_helo_timeout=5 -o smtp_connect_timeout=5
showq unix n - - - - showq
error unix - - - - - error
retry unix - - - - - error
discard unix - - - - - discard
local unix - n n - - local
virtual unix - n n - - virtual
lmtp unix - - - - - lmtp
anvil unix - - - - 1 anvil
scache unix - - - - 1 scache
#
# ================================================== ==================
# Interfaces to non-Postfix software. Be sure to examine the manual
# pages of the non-Postfix software to find out what options it wants.
#
# Many of the following services use the Postfix pipe(8) delivery
# agent. See the pipe(8) man page for information about ${recipient}
# and other message envelope options.
# ================================================== ==================
#
# 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/bin/maildrop -d vmail ${extension} ${recipient} ${user} ${nexthop} ${sender}
#
# ================================================== ==================
#
# Recent Cyrus versions can use the existing "lmtp" master.cf entry.
#
# Specify in cyrus.conf:
# lmtp cmd="lmtpd -a" listen="localhost:lmtp" proto=tcp4
#
# Specify in main.cf one or more of the following:
# mailbox_transport = lmtp:inet:localhost
# virtual_transport = lmtp:inet:localhost
#
# ================================================== ==================
#
# Cyrus 2.1.5 (Amos Gouaux)
# Also specify in main.cf: cyrus_destination_recipient_limit=1
#
#cyrus unix - n n - - pipe
# user=cyrus argv=/cyrus/bin/deliver -e -r ${sender} -m ${extension} ${user}
#
# ================================================== ==================
# Old example of delivery via Cyrus.
#
#old-cyrus unix - n n - - pipe
# flags=R user=cyrus argv=/cyrus/bin/deliver -e -m ${extension} ${user}
#
# ================================================== ==================
#
# See the Postfix UUCP_README file for configuration details.
#
uucp unix - n n - - pipe
flags=Fqhu user=uucp argv=uux -r -n -z -a$sender - $nexthop!rmail ($recipient)
#
# Other external delivery methods.
#
ifmail unix - n n - - pipe
flags=F user=ftn argv=/usr/lib/ifmail/ifmail -r $nexthop ($recipient)
bsmtp unix - n n - - pipe
flags=Fq. user=bsmtp argv=/usr/lib/bsmtp/bsmtp -t$nexthop -f$sender $recipient
scalemail-backend unix - n n - 2 pipe
flags=R user=scalemail argv=/usr/lib/scalemail/bin/scalemail-store ${nexthop} ${user} ${extension}
mailman unix - n n - - pipe
flags=FR user=list argv=/usr/lib/mailman/bin/postfix-to-mailman.py
${nexthop} ${user}


amavis unix - - - - 2 smtp
-o smtp_data_done_timeout=1200
-o smtp_send_xforward_command=yes

127.0.0.1:10025 inet n - - - - smtpd
-o content_filter=
-o local_recipient_maps=
-o relay_recipient_maps=
-o smtpd_restriction_classes=
-o smtpd_client_restrictions=
-o smtpd_helo_restrictions=
-o smtpd_sender_restrictions=
-o smtpd_recipient_restrictions=permit_mynetworks,rej ect
-o mynetworks=127.0.0.0/8
-o strict_rfc821_envelopes=yes
-o receive_override_options=no_unknown_recipient_chec ks,no_header_body_checks
-o smtpd_bind_address=127.0.0.1


mailfilter:

#
# Import variables
#
LOGNAME=tolower("$LOGNAME")
EXTENSION="$1"
RECIPIENT=tolower("$2")
USER=tolower("$3")
HOST=tolower("$4")
SENDER="$5"
DEFAULT="/var/vmail/$HOST/$USER/."

# Workaround for broken tolower function in some current fedora releases

if(!$USER)
{
USER=$3
}
if(!$HOST)
{
HOST=$4
}

if ( "$EXTENSION" ne "" )
{
DELIMITER="+"
}

if (!$SENDER)
{
SENDER = "<>"
}

#
# Autocreate maildir, if not existant
#

`test -e /var/vmail/$HOST`
if ( $RETURNCODE != 0 )
{
`mkdir /var/vmail/$HOST`
}

`test -e /var/vmail/$HOST/$USER`
if ( $RETURNCODE != 0 )
{
# `maildirmake /var/vmail/$HOST/$USER`
# `chmod -R 0700 /var/vmail/$HOST`
}


Thanks for your help!
Reply With Quote
  #7  
Old 5th July 2011, 13:21
labanczjoe labanczjoe is offline
Junior Member
 
Join Date: Jun 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello Till!

Do you see any error? The holiday season started and i would like to use the autoresponder (or cc/send copy).

I read many forum/site but cannot find the solution...

Thanks

Joe
Reply With Quote
  #8  
Old 27th July 2011, 12:25
labanczjoe labanczjoe is offline
Junior Member
 
Join Date: Jun 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hello!


Any idea?


Joe
Reply With Quote
  #9  
Old 27th July 2011, 12:31
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 35,340
Thanks: 810
Thanked 5,171 Times in 4,055 Posts
Default

The mailfilter file is incomplete or you did not post the whole file. The complete mailfilter file should look like this:

Code:
#
# Import variables
#

LOGNAME=tolower("$LOGNAME")
EXTENSION="$1"
RECIPIENT=tolower("$2")
USER=tolower("$3")
HOST=tolower("$4")
SENDER="$5"
DEFAULT="/var/vmail/$HOST/$USER/."

# Workaround for broken tolower function in some current fedora releases

if(!$USER)
{
  USER=$3
}
if(!$HOST)
{
  HOST=$4
}

if ( "$EXTENSION" ne "" )
{
  DELIMITER="+"
}

if (!$SENDER)
{
  SENDER = "<>"
}

#
# Autocreate maildir, if not existant
#

`test -e /var/vmail/$HOST`
if ( $RETURNCODE != 0 )
{
  `mkdir /var/vmail/$HOST`
}

`test -e /var/vmail/$HOST/$USER`
if ( $RETURNCODE != 0 )
{
  `maildirmake /var/vmail/$HOST/$USER`
  `chmod -R 0700 /var/vmail/$HOST`
}

# Check if the user has a autoresponder enabled

`test -f /var/vmail/mailfilters/$HOST/$USER/.autoresponder`
if ( $RETURNCODE == 0 )
{
  include "/var/vmail/mailfilters/$HOST/$USER/.autoresponder"
}

# Create a mailsize file
`echo $SIZE >> /var/vmail/$HOST/$USER/ispconfig_mailsize`


#
# Test if the user has his own maildrop include,
# if not available, check if $DEFAULT is set
# (newer maildrop get's that from the DB and updates
# it) and deliver or fail temporarily if not available
#

`test -f /var/vmail/mailfilters/$HOST/$USER/.mailfilter`
if ( $RETURNCODE == 0 )
{
  include "/var/vmail/mailfilters/$HOST/$USER/.mailfilter"
}
else
{
  if ( "$DEFAULT" ne "" )
  {
    to "$DEFAULT"
  }
  else
  {
    EXITCODE=75
    exit
  }
}
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #10  
Old 27th July 2011, 12:50
labanczjoe labanczjoe is offline
Junior Member
 
Join Date: Jun 2011
Posts: 7
Thanks: 0
Thanked 0 Times in 0 Posts
 
Default

Hello!

Sorry , here is my full .mailfilter file : copy/paste user error

#
# Import variables
#
logfile "/temp/maildrop3.log"
LOGNAME=tolower("$LOGNAME")
EXTENSION="$1"
RECIPIENT=tolower("$2")
USER=tolower("$3")
HOST=tolower("$4")
SENDER="$5"
DEFAULT="/var/vmail/$HOST/$USER/."
#logfile "/var/mail/$HOST/$USER/mailfilter.log"

# Workaround for broken tolower function in some current fedora releases

if(!$USER)
{
USER=$3
}
if(!$HOST)
{
HOST=$4
}

if ( "$EXTENSION" ne "" )
{
DELIMITER="+"
}

if (!$SENDER)
{
SENDER = "<>"
}

#
# Autocreate maildir, if not existant
#

`test -e /var/vmail/$HOST`
if ( $RETURNCODE != 0 )
{
`mkdir /var/vmail/$HOST`
}

`test -e /var/vmail/$HOST/$USER`
if ( $RETURNCODE != 0 )
{
# `maildirmake /var/vmail/$HOST/$USER`
# `chmod -R 0700 /var/vmail/$HOST`
}


`test -e /var/vmail/$HOST/$USER`
if ( $RETURNCODE != 0 )
{
# available exitcodes: EX_NOUSER=67, EX_TEMPFAIL=75
EXITCODE = 67
exit
}
# Check if the user has a autoresponder enabled

`test -f /var/vmail/mailfilters/$HOST/$USER/.autoresponder`
if ( $RETURNCODE == 0 )
{
include "/var/vmail/mailfilters/$HOST/$USER/.autoresponder"
}

# Create a mailsize file
`echo $SIZE >> /var/vmail/$HOST/$USER/ispconfig_mailsize`


#
# Test if the user has his own maildrop include,
# if not available, check if $DEFAULT is set
# (newer maildrop get's that from the DB and updates
# it) and deliver or fail temporarily if not available
#

`test -f /var/vmail/mailfilters/$HOST/$USER/.mailfilter`
if ( $RETURNCODE == 0 )
{
include "/var/vmail/mailfilters/$HOST/$USER/.mailfilter"
}
else
{
if ( "$DEFAULT" ne "" )
{
to "$DEFAULT"
}
else
{
EXITCODE=75
exit
}
}
Reply With Quote
Reply

Bookmarks

Tags
autoresponder, ispconfig3, mail, mailfilter

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Getting Email Working ISPConfig3 Squirrelmail and Courier etc Ian Wilson Installation/Configuration 17 19th June 2013 22:58
ISPconfig 3 some users cannot send email to outside Rockblade Installation/Configuration 7 29th April 2010 01:40
Why did Squirrelmail, Dovecot/IMAP & Outbound mail break? websissy Technical 4 29th October 2009 22:39
localhost postfix/master: fatal: bind 127.0.0.1 port 125: Permission denied g18c Installation/Configuration 4 24th March 2009 17:39
Can not recieve mail with de virtual mail adress Mounir Installation/Configuration 9 24th July 2006 23:16


All times are GMT +2. The time now is 03:18.


Powered by vBulletin® Version 3.8.7
Copyright ©2000 - 2014, vBulletin Solutions, Inc.