procmail configuration

Moderator: crythias

Locked
RickyA
Znuny newbie
Posts: 15
Joined: 20 Apr 2010, 19:58
Znuny Version: 2.7.4

procmail configuration

Post by RickyA »

Hi fellow otrsusers,

I tried to configure procmail. But i think that i'm doing something wrong because it doesn't seem to work.

In /etc/aliases i added the line " root: emailadres".
Then i run newaliases with usr/bin/newaliases
I added to /etc/postfix/main.cf the line " mailbox_command = /usr/bin/procmail" I also tried it with .procmailrc at the end.
restarted postfix.
And the result was that it didn't work. I am a newbie in linux, so if someone can advise me in what i am doing wrong. I would sure appreciate it.

Thanks in advance.

Regards,

Ricky
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: procmail configuration

Post by crythias »

I wrote the how-to on that. I'll try to add more information, but "it doesn't work" is really tough to diagnose.

1) .procmailrc is only supposed to be the file in /opt/otrs (it may only show up as .procmailrc.dist; if so, it needs to be renamed and possibly needs to be edited)
2) if you aren't running Linux, you probably don't have procmail, and if you are running linux and don't know if you have procmail, type

Code: Select all

which procmail
to determine where it is, if it exists in your system. The result, if anything, is exactly what you need in the mailbox_command directive. If you don't have procmail, you'll want to add it via yast/yum/apt-get/rpm/dpkg/your packagemanger, but otherwise it's likely to already be installed.
3) if your linux system is not set up to *receive* outside emails (firewall, smtp, dns/mx records etc) you need to make sure that you are able to do that.
4) if you are on your linux box, email your otrs user and see if it makes a ticket.
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
RickyA
Znuny newbie
Posts: 15
Joined: 20 Apr 2010, 19:58
Znuny Version: 2.7.4

Re: procmail configuration

Post by RickyA »

Hi Crythias,

thank you for response. I renamed the .procmailrc.dist file to .procmailrc. The file was indeed in /opt/otrs. In the .procmailrc the SYS_HOME was already pointing to the right pad /opt/otrs.

I don't know if my linux system is set up to receive outside mails. Maybe i don't understand the correct reason to use procmail, but let me give a quick explanation what i understood from procmail. "I would like to use procmail to get emails out of my inbox when the email arrives" I don't want to use cronjobs that run every 10 min or so to fetch the mail.

We use IMAP to fetch the mail We assigned a email adres to otrs. Do you add this email adres in the etc/aliases for root? Could you maybe explain point 3 and 4 of your response?

Thanks in advance.

Best regards,

Ricky
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: procmail configuration

Post by crythias »

procmail is not for getting/retrieval of emails. It's for event handling on arrival to the mailbox. The difference is that the default action for otrs is to get the email from an established email account. If you want that action to be faster, you'll just need to edit the crontab and change the /10 to /3 (every 3 minutes). If your linux box can receive emails (you can send an email to an account on your linux box from outside the box) then the procmail would likely work. If you can't send email to your linux/otrs box, just keep fetching.

I don't know how else to expand on that point:

Can you send an email to, for instance, otrs@yourotrsserver or root@yourotrsserver and it actually get there?
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
RickyA
Znuny newbie
Posts: 15
Joined: 20 Apr 2010, 19:58
Znuny Version: 2.7.4

Re: procmail configuration

Post by RickyA »

Crythias,


I think i'm a little off the solutions pad. I will just edit the cronjob to fetch my mail a little faster.

I would like to thank you for the explanation of procmail. Maybe i can use it in the future.

Best regard,

Ricky
Locked