IMAP importing spam folder
Moderator: crythias
IMAP importing spam folder
Hi guys,
Is there any way to subscribe to additional folders when using imap?
Is there any way to subscribe to additional folders when using imap?
Last edited by arvas on 03 Mar 2013, 07:32, edited 2 times in total.
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: IMAP importing spam folder
Why bother? The otrs email box isn't for humans; there's no need for it to have folders.
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
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
Re: IMAP importing spam folder
isent for humans? no wonder people complain when i put them to use otrs...
well i set up spam assassin to put spam into a box called spam. I want to retrieve the email inside this folder as there is a possibility of getting normal emails inside spam as well
for otrs we can say put the spam folder from the email account into the spam queue i suppose?
well i set up spam assassin to put spam into a box called spam. I want to retrieve the email inside this folder as there is a possibility of getting normal emails inside spam as well
for otrs we can say put the spam folder from the email account into the spam queue i suppose?
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: IMAP importing spam folder
In that case, SpamAssassin shouldn't move the mail to a "spam" folder. As far as I know, SpamAssassin adds some mail headers. So you can leave the mail in the standard INBOX and use a PostMaster filter to move the ticket to the spam queue.
The PostMaster filter can check for the mail headers set by SpamAssassin.
The PostMaster filter can check for the mail headers set by SpamAssassin.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: IMAP importing spam folder
the *email* box isn't for humans.. :) It's just a collection device in case you can't receive email directly to the OTRS box.
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
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
Re: IMAP importing spam folder
raneebs right.... my host said that the folders would 'auto create' in the other email accounts when spam would be sent, it seems that this is not true as after 2 days there is no new folder.
Thanks for the time in assisting me everyone!
P.S. crythias you are making me curious on this 'box'
Thanks for the time in assisting me everyone!
P.S. crythias you are making me curious on this 'box'
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: [SOLVED]IMAP importing spam folder
curious? You mean how to receive emails directly to otrs? Easy: if you have an smtp server on otrsserver that can receive emails otrs@otrsserver you don't need to fetch them.
Add and enable procmail (I hear that's optional, but it's about zero overhead).
Add and enable procmail (I hear that's optional, but it's about zero overhead).
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
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
Re: IMAP importing spam folder
Hey crythias,
procmail sounds great, live polling and all, but my system is on a windows. Will definitely use it once i get a linux server though!
as for my folder problem, there were some settings on the host which were lacking. They have now been done and my email accounts have a new folder called spam and ham. However OTRS is only receiving emails from the Inbox and not these other 2 folders. Did some searching but could not find much.
The only clue i did find was http://doc.otrs.org/3.0/en/html/email-receiving.html
But this seems to hint that the connection is having problems, which it is not so i do not think its appropriate.
in my settings i changed the email type to imap and to the right server url. The server can be pinged and the host has verified its correct.
Any ideas?
procmail sounds great, live polling and all, but my system is on a windows. Will definitely use it once i get a linux server though!
as for my folder problem, there were some settings on the host which were lacking. They have now been done and my email accounts have a new folder called spam and ham. However OTRS is only receiving emails from the Inbox and not these other 2 folders. Did some searching but could not find much.
The only clue i did find was http://doc.otrs.org/3.0/en/html/email-receiving.html
But this seems to hint that the connection is having problems, which it is not so i do not think its appropriate.
in my settings i changed the email type to imap and to the right server url. The server can be pinged and the host has verified its correct.
Any ideas?
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: IMAP importing spam folder
My only suggestion is to use pop3 instead.
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
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
Re: IMAP importing spam folder
i did a test but in either pop3 or imap OTRS is only downloading the main inbox folder and not the sub folders...
from what i understand the only way to download the extra folders is by IMAP as POP3 does not support this, but i am unsure how to instruct OTRS to download these extra folders
from what i understand the only way to download the extra folders is by IMAP as POP3 does not support this, but i am unsure how to instruct OTRS to download these extra folders
-
- Znuny guru
- Posts: 5018
- Joined: 13 Mar 2011, 09:54
- Znuny Version: 6.0.x
- Real Name: Renée Bäcker
- Company: Perl-Services.de
- Contact:
Re: IMAP importing spam folder
You have to change Kernel/System/MailAccount/IMAP.pm to achieve this.
Perl / Znuny development: http://perl-services.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Free Znuny add ons from the community: http://opar.perl-services.de
Commercial add ons: http://feature-addons.de
Re: IMAP importing spam folder
hey reneeb,
i think i found the line i need to change:
1) my $NOM = $IMAPObject->select('INBOX')
looks like this is the download
2)$IMAPObject->expunge_mailbox('INBOX');
looks like this is the delete command after downloading
So isit ok if i change it to
my $NOM = $IMAPObject->select('INBOX,spam,ham')
$IMAPObject->expunge_mailbox('INBOX,spam,ham');
or should i have 1 command per folder like
my $NOM = $IMAPObject->select('INBOX')
my $NOM = $IMAPObject->select('spam')
my $NOM = $IMAPObject->select('ham')
i think i found the line i need to change:
1) my $NOM = $IMAPObject->select('INBOX')
looks like this is the download
2)$IMAPObject->expunge_mailbox('INBOX');
looks like this is the delete command after downloading
So isit ok if i change it to
my $NOM = $IMAPObject->select('INBOX,spam,ham')
$IMAPObject->expunge_mailbox('INBOX,spam,ham');
or should i have 1 command per folder like
my $NOM = $IMAPObject->select('INBOX')
my $NOM = $IMAPObject->select('spam')
my $NOM = $IMAPObject->select('ham')
Re: IMAP importing spam folder
any help here?
Im on a live machine so i dont feel safe experimenting..
Im on a live machine so i dont feel safe experimenting..
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: IMAP importing spam folder
This won't work:arvas wrote:my $NOM = $IMAPObject->select('INBOX')
my $NOM = $IMAPObject->select('spam')
my $NOM = $IMAPObject->select('ham')
1) You're redefining the variable $NOM (only the last will take)
2) You aren't terminating with semicolons
3) You only need "my" on the first time you implement a variable ($NOM). Afterwards, perl knows the scope of the variable.
The best way to do this is to not have folders. But if you *have* to, you will need to wrap your list
Code: Select all
my $IMAPObject = $Connect{IMAPObject};
my $NOM = $IMAPObject->select($IMAPFolder) || 0;
Code: Select all
my $IMAPObject = $Connect{IMAPObject};
my @IMAPFolders=("INBOX", "spam", "ham"); #get a list
foreach $IMAPFolder (@IMAPFolders) #iterate the list
{ #opening brace
my $NOM = $IMAPObject->select($IMAPFolder) || 0;
Code: Select all
}
# log status
if ( $Debug > 0 || $FetchCounter ) {
Code: Select all
}
} #close brace for foreach
# log status
if ( $Debug > 0 || $FetchCounter ) {
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
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
-
- Moderator
- Posts: 10169
- Joined: 04 May 2010, 18:38
- Znuny Version: 5.0.x
- Location: SouthWest Florida, USA
- Contact:
Re: IMAP importing spam folder
btw, this didn't take into account "expunge" ... so you'll need to determine if this is going to download imap again and 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
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
Re: IMAP importing spam folder
ok, goina try turn down the server make a backup and see how it goes, thanks crythias!
Re: IMAP importing spam folder
hi,
I have switched back to pop3.
I appreciate everyones time taken in assisting me and thank you.
Regards,
arvas
I have switched back to pop3.
I appreciate everyones time taken in assisting me and thank you.
Regards,
arvas