Go Back   HowtoForge Forums | HowtoForge - Linux Howtos and Tutorials > Linux Forums > Server Operation

Do you like HowtoForge? Please consider supporting us by becoming a subscriber.
Reply
 
Thread Tools Display Modes
  #1  
Old 16th October 2012, 23:12
tholiv tholiv is offline
Junior Member
 
Join Date: Oct 2012
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Default sendmail+procmail, autoresponder not sending emails

Hi Group,

I am using a Ubuntu server where I have setup fetchmail to retrieve my gmail account emails (via POP3) and procmail to action on them.

I have been testing with a second gmail account of mine and have been receiving the automatic replies successfully. However, when I test other accounts (eg. Hotmail), these accounts do not receive the auto-reply.

My main recipe is an autoreply that I am using to reply to customers that have support requests.


Here is my procmail recipe (defined in ~/.procmailrc):

MAILDIR=$HOME/Maildir/
DEFAULT=$MAILDIR
LOGFILE=$HOME/.procmail.log
LOG=""
VERBOSE=yes

#shell - otherwise, nothing will happen when we call formail
SHELL=/bin/bash
SUBJECT=`formail -zxSubject:`

#recipe 1 - customer service support - simple autoresponder
:0 h
*!^FROM_DEAMON
*!^X-Loop: infobot_reply
*^To:.*(support\@xyz\.com)
*^Subject:.*(support)
*!^Subject:.*(Re
| (formail -r -I"Precedence: junk (autoreply)" \
-I"From: Customer.Support <collins.support@contiigo.com> "\
-I"Subject: $SUBJECT" \
-A "X-Loop: infobot-reply" ; \
cat ~/Maildir/support-autoreply.txt) |$SENDMAIL -t

#begin catch_bucket
:0 /dev/null
#end catch_bucket

--
Here is the procmail log when it processes the email sent from a Hotmail account:

procmail: Match on ! "^FROM_DEAMON"
procmail: Match on ! "^X-Loop: infobot_reply"
procmail: No match on "^To:.*(support\@xxxx\.com)"
procmail: Skipped "/dev/null"
procmail: Incomplete recipe
procmail: Assigning "LASTFOLDER=/home/ubuntu/Maildir/new/1350414344.12589_0.myserver"
procmail: Notified comsat: "ubuntu@0:/home/ubuntu/Maildir/new/1350414344.12589_0.myserver"
From MAILER-DAEMON Wed Oct 17 06:05:44 2012
Subject: Returned mail: see transcript for details
Folder: /home/ubuntu/Maildir/new/1350414344.12589_0.myserver 3102
procmail: [12793] Wed Oct 17 06:14:07 2012
procmail: Assigning "SHELL=/bin/bash"
procmail: Executing "formail,-zxSubject:"
procmail: Assigning "SUBJECT=[support] test ticket 44"
procmail: Match on ! "^FROM_DEAMON"
procmail: Match on ! "^X-Loop: infobot_reply"
procmail: Match on "^To:.*(support\@xxx\.com)"
procmail: Match on "^Subject:.*(support)"
procmail: Match on ! "^Subject:.*(Re"
procmail: Assigning "LASTFOLDER= (formail -r -I"Precedence: junk (autoreply)" \
-I"From: Customer.Support <support@xyz.com> "\
-I"Subject: $SUBJECT" \
-A "X-Loop: infobot-reply" ; \
cat ~/Maildir/support-autoreply.txt) |$SENDMAIL -t"
procmail: Notified comsat: "ubuntu@:/home/ubuntu/Maildir// (formail -r -I"Precedence: junk (autoreply)" \
-I"From: Customer.Support <support@xyz.com> "\
-I"Subject: $SUBJECT" \
-A "X-Loop: infobot-reply" ; \
cat ~/Maildir/support-autoreply.txt) |$SENDMAIL -t"
procmail: Executing " (formail -r -I"Precedence: junk (autoreply)" \
-I"From: Customer.Support <support@xyz.com> "\
-I"Subject: $SUBJECT" \
-A "X-Loop: infobot-reply" ; \
cat ~/Maildir/support-autoreply.txt) |$SENDMAIL -t"
From ubuntu Wed Oct 17 06:14:07 2012
Subject: [support] test ticket 44
Folder: (formail -r -I"Precedence: junk (autoreply)" \ -I"From: Cu 1667
procmail: [12806] Wed Oct 17 06:14:07 2012
procmail: Assigning "SHELL=/bin/bash"
procmail: Executing "formail,-zxSubject:"
procmail: Assigning "SUBJECT=Returned mail: see transcript for details"
procmail: Match on ! "^FROM_DEAMON"
procmail: Match on ! "^X-Loop: infobot_reply"
procmail: No match on "^To:.*(support\@xxx\.com)"
procmail: Skipped "/dev/null"
procmail: Incomplete recipe
procmail: Assigning "LASTFOLDER=/home/ubuntu/Maildir/new/1350414847.12806_0.myserver"
procmail: Notified comsat: "ubuntu@0:/home/ubuntu/Maildir/new/1350414847.12806_0.myserver"
From MAILER-DAEMON Wed Oct 17 06:14:07 2012
Subject: Returned mail: see transcript for details
Folder: /home/ubuntu/Maildir/new/1350414847.12806_0.myserver 3102

Here is what is in the transcript:

----- Transcript of session follows -----
... while talking to mx2.hotmail.com.:
>>> MAIL From:<ubuntu> SIZE=1065 AUTH=<>
<<< 550 DY-001 (SNT0-MC1-F3) Unfortunately, messages from 107.21.30.26 weren't sent. Please contact your Internet service provider. You can tell them that Hotmail does not relay dynamically-assigned IP ranges. You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors.
554 5.0.0 Service unavailable


Apologies if this is too much information. Your assistance will be greatly appreciated!

Thanks
Reply With Quote
Sponsored Links
  #2  
Old 17th October 2012, 16:25
falko falko is offline
Super Moderator
 
Join Date: Apr 2005
Location: Lüneburg, Germany
Posts: 41,701
Thanks: 1,900
Thanked 2,745 Times in 2,578 Posts
 
Default

Quote:
<<< 550 DY-001 (SNT0-MC1-F3) Unfortunately, messages from 107.21.30.26 weren't sent. Please contact your Internet service provider. You can tell them that Hotmail does not relay dynamically-assigned IP ranges. You can also refer your provider to http://mail.live.com/mail/troubleshooting.aspx#errors.
It seems as if you're sending from a dynamic IP address. To fix this, you can set up relaying: http://www.howtoforge.com/postfix_re...her_mailserver
__________________
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
Reply

Bookmarks

Tags
procmail, procmail_autoreply

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
Stange mail problem The-Ghost Installation/Configuration 6 25th April 2010 20:59
Fedora 12 - Strage problem - Freezes K_meleonu Installation/Configuration 6 3rd March 2010 19:42
Apche hangs ever few minutes after an update rslinks Server Operation 2 12th December 2009 19:57
plenty of procmail/trashscan processes ZyanKLee Installation/Configuration 10 27th December 2005 21:09
procmail <defunct> ZyanKLee Installation/Configuration 1 19th December 2005 01:58


All times are GMT +2. The time now is 14:46.


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