Mail deletion after ticket creation

Moderator: crythias

Locked
kyiyer
Znuny newbie
Posts: 11
Joined: 04 Feb 2013, 15:23
Znuny Version: 3.2.2
Real Name: K Y Iyer
Company: New Delhi Television Ltd

Mail deletion after ticket creation

Post by kyiyer »

Hi

OTRS is not deleting mails from my Exchange 2010 SP2 mailbox.

I started off with POP3 access to the mailbox and it worked for a bit then stopped deleting mails.
I changed it to IMAP and it worked well for about a day, reading the mailbox, creating tickets and deleting mails.
Now, some mails are again getting stuck in the mailbox.
If the mail is marked read in the Exchange mailbox, I get new ticket notification because the mail is stuck in the mailbox but duplicate tickets are not being generated.
If the mail is marked unread in the Exchange mailbox, I get new ticket notification because the mail is stuck in the mailbox and duplicate tickets are generated.

I have these errors in /tmp/otrs.log

[Mon Feb 4 19:06:02 2013][Notice][Kernel::System::PostMaster::FollowUp::Run] FollowUp Article to Ticket [2013020410000946] created (TicketID=342, ArticleID=839). ,
[Mon Feb 4 19:06:03 2013][Notice][Kernel::System::PostMaster::FollowUp::Run] FollowUp Article to Ticket [2013020310001107] created (TicketID=236, ArticleID=840). ,
[Mon Feb 4 19:06:03 2013][Notice][Kernel::System::MailAccount::IMAP::_Fetch] IMAP: Fetched 2 email(s) from helpdesk/xxxxxServer.subDomain.mydomain.com.
[Mon Feb 4 19:06:08 2013][Error][Kernel::System::Email::SMTP::Send][164] Can't send message: 354Start mail input; end with <CRLF>.<CRLF>
! Enable Net::SMTP debug for more info!
[Mon Feb 4 19:06:12 2013][Info][Kernel::System::Email::Send] Error sending message
[Mon Feb 4 19:06:12 2013][Error][Kernel::System::Ticket::Article::ArticleSend][2076] Impossible to send message to: customerUser@mydomain.com .

It is possible these errors are coming because the customerUser does not exist in our database as the user has never logged in - and probably never will - our users prefer to send mails.

I am also trying to figure out how to enable Net::SMTP debug so that I can send detailed logs.

Any pointers as to why mails are not getting deleted from Exchange server after running for about a day?

Thanks very much

Iyer
kyiyer
Znuny newbie
Posts: 11
Joined: 04 Feb 2013, 15:23
Znuny Version: 3.2.2
Real Name: K Y Iyer
Company: New Delhi Television Ltd

Re: Mail deletion after ticket creation

Post by kyiyer »

Hi

I realised that I had already enabled Net::SMTP debugging in SMTP.pl

# debug
$Self->{Debug} = $Param{Debug} || 0;
$Self->{Debug} = 1000;
if ( $Self->{Debug} > 2 ) {

# shown on STDERR
$Self->{SMTPDebug} = 1;
}

Why don't all mails get deleted from the mailbox?

Thanks

Iyer
kyiyer
Znuny newbie
Posts: 11
Joined: 04 Feb 2013, 15:23
Znuny Version: 3.2.2
Real Name: K Y Iyer
Company: New Delhi Television Ltd

Re: Mail deletion after ticket creation

Post by kyiyer »

Hi

I am also getting the postmaster error.

[Mon Feb 4 19:44:02 2013][Notice][Kernel::System::PID::PIDCreate] Can't create PID PostMasterMailbox, because it's already running (del-syslog.archana.ndtv.com/19746)!
[Mon Feb 4 19:44:18 2013][Error][Kernel::System::Email::SMTP::Send][164] Can't send message: 354Start mail input; end with <CRLF>.<CRLF>
! Enable Net::SMTP debug for more info!
[Mon Feb 4 19:44:23 2013][Info][Kernel::System::Email::Send] Error sending message


Could this and the "cannot-delete-mails" issues be connected somehow?

Thanks very much

Best wishes

Iyer

otrs 3.2.1
CentOS release 5.5 (Final)
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Mail deletion after ticket creation

Post by crythias »

1) kill postmaster cron jobs
2) dont' run postmastermailbox every minute. change it to every /3 minutes or use procmail on linux to handle on demand instead of fetch
3) your send problems are not related, but impossible to send is impossible to send. Normally this is related to malformed email address, but can be in addition, any part of sendmail not being properly configured. No route to the smtp server, no port 25 open, no authentication, no smtp server configured, sendmail not existing ... it depends on your setup.
OTRS 6.0.x (private/testing/public) on Linux with MySQL database.
Please edit your signature to include your OTRS version, Operating System, and database type.
Click Subscribe Topic below to get notifications. Consider amending your topic title to include [SOLVED] if it is so.
Need help? Before you ask
kyiyer
Znuny newbie
Posts: 11
Joined: 04 Feb 2013, 15:23
Znuny Version: 3.2.2
Real Name: K Y Iyer
Company: New Delhi Television Ltd

Re: Mail deletion after ticket creation

Post by kyiyer »

Thanks a million for your responses

1. Will find out how to kill postmaster cron jobs
2. Don't know what procmail means for on demand - will find out and try to implement
3. Route to SMTP server is fine - as notification mails are delivered fine - only additional article additions from within the OTRS web interface report this error.
4. Not using sendmail - OTRS is configured to use SMTP to send mails
5. Overnight, one mail in Exchange has resulted in about 8 tickets and about 18 mails. But the mailbox was clear. It seems that OTRS decides to delete the mails after fetching them multiple times. What could cause SOME mails to not get deleted the first time while most of the others get deleted the first time?

Please do help - am happy to provide any details.

Thanks a million, once again

Best wishes

Iyer

otrs 3.2.1
kyiyer
Znuny newbie
Posts: 11
Joined: 04 Feb 2013, 15:23
Znuny Version: 3.2.2
Real Name: K Y Iyer
Company: New Delhi Television Ltd

Re: Mail deletion after ticket creation

Post by kyiyer »

Hi

Thanks for pointing me in the right direction. Now mails are going into OTRS directly.

Excellent

Many, many thanks to you

Iyer
Locked