Procmail installation and Configuration

Moderator: crythias

Locked
Pranali
Znuny newbie
Posts: 18
Joined: 24 Feb 2014, 06:44
Znuny Version: 3.3.4

Procmail installation and Configuration

Post by Pranali »

Hello All ,

i want to fetch mails through multiple mail id in otrs through procmail .

I installed procmail and configured as below
###########################################
rename .procmailrc.dist to .procmailrc
modifies .procmailrc to a proper SYS_HOME /opt/otrs

added an alias for root in /etc/aliases as
postmaster:otrs
root:otrs
run newaliases as root

In /etc/postfix/main.cf added these lines
myhostname = hostname
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = hostname, localhost.localdomain,localhost
relayhost = [smtp.gmail.com]:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.7
#mailbox_command = procmail -a "$EXTENSION"
home_mailbox = Maildir/
mailbox_command = /usr/bin/procmail
#alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

To fetch a multiple mail , I installed fetchmail.
edited etc/fetchmailrc
set syslog
set daemon 1
set postmaster otrs

defaults
proto imap
poll pop.gmail.com
proto pop3
user "xxxxx@gmail.com"
pass "xxxxx"
is otrs
keep
ssl


user "xxxxxx@gmail.com"
pass "xxxxx"
is otrs
keep
ssl

#############################################
mails which i am fetching is not getting in the dashboard.
Am I missing something here?
Last edited by Pranali on 19 May 2014, 09:20, edited 1 time in total.
wurzel
Znuny guru
Posts: 3273
Joined: 08 Jul 2010, 22:25
Znuny Version: x.x.x
Real Name: Florian

Re: Procmail installation and Configuration

Post by wurzel »

Hi,

.procmail and mailserver is not a OTRS topic. The procmailrc devlivered from OTRS package is working fine.

And without logfiles no help will be possible.

And you don't need to fetch mails. Deliver them to your local mailserver. Works fine.
Please study your mailserver config + logfiles.

Florian
OTRS 2025 SILVER (Prod)
OTRS 2025 auf Debian 12 (Test)
Znuny 7.x latest version testing auf Debian 12

-- Ich beantworte keine Forums-Fragen PN - No PN please

I won't answer to unfriendly users any more. A greeting and regards are just polite.
Pranali
Znuny newbie
Posts: 18
Joined: 24 Feb 2014, 06:44
Znuny Version: 3.3.4

Re: Procmail installation and Configuration

Post by Pranali »

Thanks for reply wruzel .

These are my log files , some one will please tell me , what i am missing here
May 19 10:13:06 hostname postfix/qmgr[1886]: 1F04CC17F3: removed
May 19 10:13:50 hostname fetchmail[1327]: 1 message for xxxxxxxxx@gmail.com at pop.gmail.com (2079 octets).
May 19 10:13:51 hostname postfix/smtpd[2796]: connect from localhost[127.0.0.1]
May 19 10:13:51 hostname postfix/smtpd[2796]: 95092C17BC: client=localhost[127.0.0.1]
May 19 10:13:51 hostname postfix/cleanup[1949]: 95092C17BC: message-id=<CAJHvqH4_2vRuG4fiXht6Rb-pbJHeDaV82e7npx_yNdy+ZumeMw@mail.gmail.com>
May 19 10:13:51 hostname postfix/qmgr[1886]: 95092C17BC: from=<xxxxxxx@gmail.com>, size=2373, nrcpt=1 (queue active)
May 19 10:13:51 hostname fetchmail[1327]: reading message xxxxx55@gmail.com@pb-in-f109.1e100.net:1 of 1 (2079 octets) not flushed
May 19 10:13:51 hostname postfix/local[1951]: 95092C17BC: to=<otrs@localhost>, relay=local, delay=0.08, delays=0.06/0/0/0.02, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail)
May 19 10:13:51 hostname postfix/qmgr[1886]: 95092C17BC: removed
May 19 10:13:52 hostname postfix/smtpd[2796]: disconnect from localhost[127.0.0.1]
May 19 10:14:01 hostname postfix/pickup[1889]: 3C7D7C17F3: uid=999 from=<otrs>
May 19 10:14:01 hostname postfix/cleanup[1949]: 3C7D7C17F3: message-id=<20140519044401.3C7D7C17F3@snigdha>
May 19 10:14:01 hostname postfix/qmgr[1886]: 3C7D7C17F3: from=<otrs@hostname >, size=535, nrcpt=1 (queue active)
May 19 10:14:01 hostname postfix/local[1951]: 3C7D7C17F3: to=<otrs@hostname >, orig_to=<otrs>, relay=local, delay=0.04, delays=0.02/0/0/0.02, dsn=2.0.0, status=sent (delivered to command: /usr/bin/procmail)
May 19 10:14:01 hostname postfix/qmgr[1886]: 3C7D7C17F3: removed
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Procmail installation and Configuration

Post by jojo »

check permissions of the .procmailrc file
check the config of the postfix, which also could be wrong
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Pranali
Znuny newbie
Posts: 18
Joined: 24 Feb 2014, 06:44
Znuny Version: 3.3.4

Re: Procmail installation and Configuration

Post by Pranali »

permission for .procmailrc
-rw-r---- 1 root root 34520 Feb 19 2013 .procmailrc

This is my config files
In /etc/postfix/main.cf added these lines
myhostname = hostname
alias_maps = hash:/etc/aliases
alias_database = hash:/etc/aliases
mydestination = hostname, localhost.localdomain,localhost
relayhost = [smtp.gmail.com]:587
mynetworks = 127.0.0.0/8 [::ffff:127.0.0.0]/104 [::1]/128 192.168.1.7
#mailbox_command = procmail -a "$EXTENSION"
home_mailbox = Maildir/
mailbox_command = /usr/bin/procmail
#alias_maps = hash:/etc/aliases
mailbox_size_limit = 0
recipient_delimiter = +
inet_interfaces = all
inet_protocols = all

please suggest , is there is anything wrong?
jojo
Znuny guru
Posts: 15020
Joined: 26 Jan 2007, 14:50
Znuny Version: Git Master
Contact:

Re: Procmail installation and Configuration

Post by jojo »

at least permissions for the .procmailrc are wrong as procmail runs with user permissions
"Production": OTRS™ 8, OTRS™ 7, STORM powered by OTRS
"Testing": ((OTRS Community Edition)) and git Master

Never change Defaults.pm! :: Blog
Professional Services:: http://www.otrs.com :: enjoy@otrs.com
Pranali
Znuny newbie
Posts: 18
Joined: 24 Feb 2014, 06:44
Znuny Version: 3.3.4

Re: Procmail installation and Configuration

Post by Pranali »

Thanks JOJO , i understand that for .procmailrc should have otrs user permissions. So when i changed the owner (permissions) for .procmailrc from root to otrs.
The mails started fetching and was available in OTRS. But i am also seeing the otrs crons also getting fetched into otrs. Secondly, when i run the bin/otrs.SetPermissions.pl the permissions of .procmailrc reverts back to root again.

any idea on this?
You do not have the required permissions to view the files attached to this post.
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: Procmail installation and Configuration

Post by crythias »

Disable accounts being fetched within OTRS. Also if you know what works and what breaks what works, don't break it again.
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
Locked