#362 closed setup (fixed)
Case for "mail delivery failed"
Reported by: | kshetriamrit@… | Owned by: | bas |
---|---|---|---|
Priority: | major | Milestone: | |
Component: | email2trac | Version: | 2.8.4 |
Keywords: | Cc: |
Description
I have a case where there are multiple recipient for a mail. But one of the email is returning "mail delivery failed" email which is again used to comment on the ticket.
And this process is going in a loop.
Do we have any mechanism to control this? I searched but found nothing.
Thanks
Attachments (0)
Change History (14)
comment:1 Changed 8 years ago by bas
- Status changed from new to assigned
- Type changed from defect to setup
comment:2 Changed 8 years ago by kshetriamrit@…
Thanks for quick response. I will reconfigure this and will get back to you soon.
comment:3 Changed 8 years ago by kshetriamrit@…
Here we have our own email server. And email contains text like "RESOLVER.ADR.RecipNotFound?". The config you sent did not work for me. All emails are sent and received from same user.
I guess there is no need to restart any service. If yes, what is it?
comment:4 Changed 8 years ago by bas
You can send a test mail to a unknown user and see what the mail server gives back. Look in the header of the message to see what your MTA is using and use this in your black_list configuration. The line I send you is in use by our setup. You have to adjust it to your situation or afjust your Mail server to give a proper message.
comment:5 follow-up: ↓ 6 Changed 8 years ago by kshetriamrit@…
Ok, here we have random id for failed mail (don't know why). So putting it in blacklist might not work.
Also I noticed something. Can we not specify that only users that are registered can create ticket? or user that are in CC so that this can be eliminated or it can be more secure since other person cannot create ticket?
comment:6 in reply to: ↑ 5 Changed 8 years ago by bas
Replying to kshetriamrit@…:
Ok, here we have random id for failed mail (don't know why). So putting it in blacklist might not work.
It is just a match, there is no familiar part in the sender address?
Also I noticed something. Can we not specify that only users that are registered can create ticket? or user that are in CC so that this can be eliminated or it can be more secure since other person cannot create ticket?
Did you read the configuration options or documentation?:
comment:7 Changed 8 years ago by kshetriamrit@…
Hi, before going to permission, I now have common text on sender. I have put the string in black_list but it did not work. Is there any service to restart?
For permission, I am using trac for ticket_permission_system. But somehow it is not performing accordingly. I will look into it. But currently black_list is still not working.
comment:8 Changed 8 years ago by bas
To track this down. You can put email2trac.conf in debug mode. Then the mail message will be saved in /tmp and the debug output is logged in the syslog. After that you can test why black_list is not working on the commmand line:
- email2trac -n -v -d -p <project> < /tmp/save_message
search for black_list. Can you send my the black_list line?
comment:9 Changed 8 years ago by kshetriamrit@…
2015-04-01 07:43:03,214 email2trac : Main function parse 2015-04-01 07:43:03,215 email2trac : DRY_RUN: NOT saving email message 2015-04-01 07:43:03,217 email2trac : function get_sender_info 2015-04-01 07:43:03,217 email2trac : function email_to_unicode 2015-04-01 07:43:03,219 email2trac : email name: , email address: postmaster@<domain> 2015-04-01 07:43:03,294 email2trac : function email_header_acl: white_list 2015-04-01 07:43:03,294 email2trac : white_list not defined, all messages are allowed. 2015-04-01 07:43:03,294 email2trac : function email_header_acl: black_list 2015-04-01 07:43:03,294 email2trac : function email_header_acl: recipient_list 2015-04-01 07:43:03,294 email2trac : recipient_list not defined, all messages are allowed. 2015-04-01 07:43:03,294 email2trac : function spam 2015-04-01 07:43:03,295 email2trac : function spam 2015-04-01 07:43:03,295 email2trac : function email_to_unicode 2015-04-01 07:43:03,295 email2trac : subject: u'Undeliverable: [MASSMAIL]Re: <ticket description>' 2015-04-01 07:43:03,295 email2trac : function parse_delivered_to_field 2015-04-01 07:43:03,295 email2trac : function parse_subject_header 2015-04-01 07:43:03,295 email2trac : function ticket_update 2015-04-01 07:43:03,296 email2trac : ticket id: #<number>
and I have placed "postmaster@" in black list.
comment:10 Changed 8 years ago by bas
In which email header field is postmaster@ located, eg:
- Reply-to
- From
- ...
comment:11 Changed 8 years ago by Amrit Kshetri <kshetriamrit@…>
It exists in From:
comment:12 Changed 8 years ago by bas
Which version are you using? I just tried it and everything works as expected:
- email2trac.conf
[beowulf] black_list: MAILER-DAEMON@,postmaster@, mailman-bounces@, MicrosoftExchange.*@surfsara.nl
- test.msg
From bas.vandervlies@surfsara.nl Wed Mar 8 15:29:17 2006 Return-Path: <basv@sara.nl> X-Original-To: test@subtrac.sara.nl Delivered-To: test@subtrac.sara.nl Received: from surfboard.ka.sara.nl (surfboard.ka.sara.nl [145.100.6.3]) by localhost.localdomain (Postfix) with ESMTP id 506702800682 for <test@subtrac.sara.nl>; Wed, 8 Mar 2006 15:29:17 +0100 (CET) Received: from [145.100.6.134] ([145.100.6.134] RDNS failed) by surfboard.ka.sara.nl with Microsoft SMTPSVC(6.0.3790.1830); Wed, 8 Mar 2006 15:29:17 +0100 Message-ID: <440EEA39.6070200@sara.nl> Date: Wed, 08 Mar 2006 15:29:13 +0100 From: Bas van der Vlies <postmaster@sara.nl> User-Agent: Thunderbird 1.5 (Windows/20051201) MIME-Version: 1.0 To: test@subtrac.sara.nl Subject: Test123 Content-Type: multipart/mixed; boundary="------------070800080005060203060809" X-OriginalArrivalTime: 08 Mar 2006 14:29:17.0140 (UTC) FILETIME=[AE40B940:01C642BC] This is a multi-part message in MIME format. --------------070800080005060203060809 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Test1234 Test1234 --- As of 1 January 2013, SARA has a new name: SURFsara. Bas van der Vlies | Operations, Support & Development | SURFsara | Science Park 140 | 1098 XG Amsterdam | T +31 (0) 20 592 30 00 | bas.vandervlies@surfsara.nl | www.surfsara.nl | --------------070800080005060203060809 Content-Type: text/plain; name="basje.txt" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="basje.txt" test123 test1234 --------------070800080005060203060809--
- email2trac -n -v -d -p beowulf < test.msg
2015-04-02 15:55:47,197 email2trac beowulf: Found trac version: 1.0 2015-04-02 15:55:47,414 email2trac beowulf: Loading environment /data/trac/osd/project/beowulf 2015-04-02 15:55:47,892 email2trac beowulf: Main function parse 2015-04-02 15:55:47,894 email2trac beowulf: DRY_RUN: NOT saving email message 2015-04-02 15:55:47,903 email2trac beowulf: function get_sender_info 2015-04-02 15:55:47,904 email2trac beowulf: function email_to_unicode 2015-04-02 15:55:47,904 email2trac beowulf: repr:'Bas van der Vlies' type:<type 'str'> 2015-04-02 15:55:47,904 email2trac beowulf: email name: Bas van der Vlies, email address: postmaster@sara.nl 2015-04-02 15:55:47,909 email2trac beowulf: function email_header_acl: white_list 2015-04-02 15:55:47,909 email2trac beowulf: white_list not defined, all messages are allowed. 2015-04-02 15:55:47,910 email2trac beowulf: function email_header_acl: black_list 2015-04-02 15:55:47,910 email2trac beowulf: postmaster@sara.nl contains postmaster@ 2015-04-02 15:55:47,910 email2trac beowulf: Message rejected : postmaster@sara.nl in black list
comment:13 Changed 8 years ago by Amrit Kshetri <kshetriamrit@…>
- Resolution set to fixed
- Status changed from assigned to closed
Sorry for the late response. All the changes I made was on the other file. Original config file where in different location.
It is working as expected.
Thanks for your support.
comment:14 Changed 8 years ago by bas
Glad that everything works as expected.
At our site we user:
See https://oss.trac.surfsara.nl/email2trac/wiki/Email2tracConfiguration