Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > ISPConfig 2 > General

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 3rd December 2006, 13:15
vistree vistree is offline
Member
 
Join Date: Aug 2006
Posts: 61
Thanks: 2
Thanked 4 Times in 3 Posts
Default autoreply not to Spammer

Hi, is it possible to modify the autoresponder-script in a way, that SPAM-detected mails are not included (no autoresponder for email containing the rewrite subjet from the user-spamfilter-dialog)?

Regards
Kai
Reply With Quote
Sponsored Links
  #2  
Old 4th December 2006, 10:01
till till is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 35,778
Thanks: 821
Thanked 5,333 Times in 4,184 Posts
Default

Yes. You can try to modify the autoresponder procmail recipe in /root/ispconfig/isp/conf/
__________________
Till Brehm
--
Get ISPConfig support and the ISPConfig 3 manual from ispconfig.org.
Reply With Quote
  #3  
Old 4th December 2006, 15:53
vistree vistree is offline
Member
 
Join Date: Aug 2006
Posts: 61
Thanks: 2
Thanked 4 Times in 3 Posts
Default

Thank you till for reply!
I had a look at the autoresponder.rc.master - but thing that this job is to big for me!
Did anyone allready tried this? I think this could be a matter of general intesest, as every autoreply to a Spammer (which mostly use not-existing-email-adresses) causes in an additonal mail in the users inbox: a not delivered notice from postfix.

Kai
Reply With Quote
  #4  
Old 5th December 2006, 17:37
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

You could put this at the beginning of the autoresponder file:

Code:
:0:
* ^X-Spam-Status: Yes
so that it looks like this:

Code:
:0:
* ^X-Spam-Status: Yes

SHELL=/bin/sh    # for other shells, this might need adjustment
EMAIL=`formail -zxTo:`
[...]
I haven't tested this, but it could work.
__________________
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
  #5  
Old 5th December 2006, 22:11
vistree vistree is offline
Member
 
Join Date: Aug 2006
Posts: 61
Thanks: 2
Thanked 4 Times in 3 Posts
Default

Hi Falko,
thank you for that code - I already put it in a testaccount. Normals Mails are still replied. I wait until tomorrow and post the result of incomming spam.

Regards
Kai
Reply With Quote
  #6  
Old 6th December 2006, 16:51
vistree vistree is offline
Member
 
Join Date: Aug 2006
Posts: 61
Thanks: 2
Thanked 4 Times in 3 Posts
Default

Hi Falko an forum,
the solution code
Quote:
:0:
* ^X-Spam-Status: Yes
does not work for me ...
Is it enough just to include this code in the autoresponder.rc or must there be any other changes for example in the master.cf of postfix?!
Could it work with a smal change in the code? e.g.
Quote:
* !^X-Spam-Status: Yes
instead

Regards
Kai
Reply With Quote
  #7  
Old 6th December 2006, 18:08
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,740 Times in 2,575 Posts
Default

Quote:
Originally Posted by vistree
Is it enough just to include this code in the autoresponder.rc or must there be any other changes for example in the master.cf of postfix?!
It must be in your .autoresponder.rc only (and also in the template in /root/ispconfig/isp/conf, otherwise ISPConfig will overwrite your changes).

Quote:
Originally Posted by vistree
Could it work with a smal change in the code? e.g.

instead

Regards
Kai
Yes. Try it. This tutorial might be interesting for you: http://www.howtoforge.com/procmail_tips_recipes
__________________
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
  #8  
Old 16th December 2006, 17:41
vistree vistree is offline
Member
 
Join Date: Aug 2006
Posts: 61
Thanks: 2
Thanked 4 Times in 3 Posts
 
Default working solution

Testing around a little bit, we found a very simple solution. The job was to insert Falkos code at the correct place:

We modified the file:
/root/ispconfig/isp/conf/autoresponder.rc.master

inserting the line after "# Don't reply to SPAM"

Code:
SHELL=/bin/sh    # for other shells, this might need adjustment
EMAIL=`formail -zxTo:`

              :0 Whc: vacation.lock
               # Perform a quick check to see if the mail was addressed to us
               #* $^To:.*\<$\LOGNAME\>
               # Don't reply to daemons and mailinglists
              * !^FROM_DAEMON
               # Don't reply to SPAM
              * !^X-Spam-Status: Yes
               # Mail loops are evil
              * !^X-Loop: ${EMAIL}
              | formail -rD 8192 {PFAD}/.vacation.cache

                :0 ehc         # if the name was not in the cache
                | (formail -rI"From: {EMAIL_ADDRESS}" -I"Precedence: junk" \
                     -A"X-Loop: ${EMAIL}" ; \
                   cat {PFAD}/.vacation.msg \
                  ) | $SENDMAIL -oi -t
Of course, the code effect only accounts marked for autoreply after this modification. So for existing autoreplies just disable and enable again using one of the possiblities offert by ISPConfig (domain-control or mailuser-login)

Have a nice weekend
Kai
Reply With Quote
Reply

Bookmarks

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
Autoreply shows slashes when activated. damir General 11 5th September 2006 10:50
Autoreply problem using Virtual Users And Domains With Postfix, Courier And MySQL triak HOWTO-Related Questions 1 19th May 2006 15:25
Virtual Users + Domains With Postfix, Courier + MySQL - Out of Office, Autoreply amilcar HOWTO-Related Questions 13 27th February 2006 12:31


All times are GMT +2. The time now is 00:43.


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