How “ZZZAuto.pm” can stop OTRS from sending mail?

email “ZZZAuto.pm” is the second configuration file that is searched by OTRS to find configuration entries like SMTP. To find out a specific configuration entry, OTRS searches “config.pm” first and if it is present, it will be used. If not present then “ZZZAuto.pm” will be searched for.
But what’s wrong with this? In our OTRS installation we were using a mail account to send e-mails and notifications from OTRS using SMTP. This mail account was using user name and password for authentication. After a while, mail server changed its policies. It didn’t need user name and password anymore. If OTRS sent “AuthUser” and “AuthPassword” to mail server, the mail server would not accept any e-mail and would give us following error message:

Message: SMTP authentication failed: 535 authorization failed (#5.7.0) ! Enable Net::SMTP debug for more info!

So in a test machine I commented “AuthUser” and “AuthPassword” in the “config.pm” and everything went O.K. I did same modifications in the operational machine but OTRS was not able to sent any e-mail yet and error message was not changed.
I was very confused! Why same settings were working on one machine but would not work in another one? I did some tests and realized if I comment “Host” in “config.pm” I receive a new error message:

Message: Can’t connect to somewhere.com : Invalid argument!

I wondered while I have commented “Host” entry in “config.pm” so where were “somewhere.com” coming from? I searched for and YES! It was in “ZZZAuto.pm”. “Host” was not important for me because I could change it in “config.pm” but I also found two annoying entries there: “AuthUser” and “AuthPassword”. They should be absent but they were sent to mail server and were causing it stop relaying our messages. In the other hands they were not present in “config.pm” as I desired but because OTRS was finding them in “ZZZAuto.pm” so was sending them back to the mail server. I commented them in “ZZZAuto.pm” too and everything went O.K. once another time.

 

See also:

OTRS config files and SysConfig

SMTP authentication failed

 

دیدگاهتان را بنویسید

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *