fetchmail + pgp

Moderator: crythias

Locked
trololo
Znuny newbie
Posts: 7
Joined: 16 Nov 2015, 12:34
Znuny Version: 5free

fetchmail + pgp

Post by trololo »

Hi, I'm trying to fetchemails from an IMAP account,

so, the /var/mail/otrs file is created and if I do this:

Code: Select all

cat /var/mail/otrs |  perl otrs.Console.pl Maint::PostMaster::Read
a single HUGE ticket is opened, with all the bodies from hundreds of email. am I missing something? perhaps I'm using a wrong format for mail?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: fetchmail + pgp

Post by crythias »

each email as a file or separate stream must be parsed individually.
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
trololo
Znuny newbie
Posts: 7
Joined: 16 Nov 2015, 12:34
Znuny Version: 5free

Re: fetchmail + pgp

Post by trololo »

Thank you, well it's not very intuitive from the documentation :lol:

do you know what method would be best to achieve this?
crythias
Moderator
Posts: 10170
Joined: 04 May 2010, 18:38
Znuny Version: 5.0.x
Location: SouthWest Florida, USA
Contact:

Re: fetchmail + pgp

Post by crythias »

I'm not entirely certain how to address this within this forum. There are ways to make your mailbox *not* be a single file, but that's a scope outside of OTRS.
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
trololo
Znuny newbie
Posts: 7
Joined: 16 Nov 2015, 12:34
Znuny Version: 5free

Re: fetchmail + pgp

Post by trololo »

yes, I believe Maildir is the answer. I'm looking into it
trololo
Znuny newbie
Posts: 7
Joined: 16 Nov 2015, 12:34
Znuny Version: 5free

Re: fetchmail + pgp

Post by trololo »

I use this solution, it's still on staging server but seems to be working fine for my needs

Code: Select all

#!/bin/bash

#fetch new messages only
/usr/bin/fetchmail -k;

#break the inbox in several messages and pipe content to the worker
cat /var/mail/otrs | formail -ds   /usr/bin/perl otrs.Console.pl Maint::PostMaster::Read
> /var/mail/otrs
Locked