SMTP status: piler: ERROR

Issue #210 resolved
Former user created an issue

Hi J. Suto,

What do I need to configure in postix? I adjusted inet_interfaces and the mynetworks parameters, so it is now listening on the right interface and IP address and it accepts mails from the hosts that will bcc into piler (also postfix hosts). When logging on to piler I see SMTP status : piler: ERROR smarthost: OK.

I telnet'ed some mails into piler, but my amount of messages is still zero. Am I missing a step somewhere?

Thanks!

RTop

Comments (16)

  1. Ronald Top

    Hi J. Suto,

    I checked the /var/log/maillog and see the follwing entries. What is wrong and why is the piler stuff logged here?

    Dec 13 23:58:08 sys-piler01 postfix/smtpd[7173]: connect from mailgw.officeunlimited.nl[10.0.8.40] Dec 13 23:58:32 sys-piler01 postfix/smtpd[7173]: 566FD20419: client=mailgw.officeunlimited.nl[10.0.8.40] Dec 13 23:58:44 sys-piler01 postfix/cleanup[7176]: 566FD20419: message-id=<> Dec 13 23:58:44 sys-piler01 postfix/qmgr[7171]: 566FD20419: from=rtop@live.nl, size=233, nrcpt=1 (queue active) Dec 13 23:58:45 sys-piler01 postfix/smtp[7177]: 566FD20419: to=ronald.top@topautomation.nl, relay=mailgw.officeunlimited.nl[10.0.8.40]:25, delay=25, delays=24/0.06/0.02/0.21, dsn=2.0.0, status=sent (250 2.0.0 Ok: queued as 5B2158240A) Dec 13 23:58:45 sys-piler01 postfix/qmgr[7171]: 566FD20419: removed Dec 13 23:58:56 sys-piler01 postfix/smtpd[7173]: disconnect from mailgw.officeunlimited.nl[10.0.8.40] Dec 14 00:00:13 sys-piler01 piler[7215]: reloaded config: /usr/local/etc/piler.conf Dec 14 00:00:13 sys-piler01 piler[7215]: ERR: cannot bind to port Dec 14 00:00:13 sys-piler01 piler[7215]: piler has been terminated

    And if I just do 'service mailpiler restart' i see : [root@sys-piler01 postfix]# service mailpiler restart stopping piler kill: usage: kill [-s sigspec | -n signum | -sigspec] pid | jobspec ... or kill -l [sigspec] starting piler . . . [root@sys-piler01 postfix]#

    And in the /var/log/maillog I see Dec 14 00:00:13 sys-piler01 piler[7215]: reloaded config: /usr/local/etc/piler.conf Dec 14 00:00:13 sys-piler01 piler[7215]: ERR: cannot bind to port Dec 14 00:00:13 sys-piler01 piler[7215]: piler has been terminated

    Any ideas?

    Thanks!

    RTop

  2. Ronald Top

    OK, I figured to check out /usr/local/etc/piler.conf and concluded that postfix is in the way, so turned it off and chkconfig'ed it off. I telnet'ed two mails again into postfix and they are somewhere in the system, because I see now recieved mails 2 in the system health page. Only I still see SMTP Status : Piler: Error Smarthost: OK. So there is still something wrong. And I wonder how to retrieve mails from the archive, but that's another story I guess.

    Can you please help me out with the SMTP stuff?

    Thanks! RTop.

  3. Janos SUTO repo owner

    Hello Ronald, so you figured out to disable postfix, since you don't really need it. In fact you may have any ordinary MTA on the piler host just make sure they don't want to listen on the same IP-address and port.

    Regarding the piler and smarthost error in the gui: make sure you set PILER_HOST and SMARTHOST variables in config-site.php. PILER_HOST should be the IP-address of the archiving host, and SMARTHOST should be the name of address of your MTA that piler can use as a smart host for restoring emails.

    And here may come postfix on the archiving host: you may put postfix to 127.0.0.1:10025, and configure this as smarthost. But you may use your current mail server, and that's what I recommend.

    Retrieving emails from the archive usually means that a user clicks in the restore link, and he gets the email to his mailbox.

  4. Ronald Top

    Hi J. Suto (what's your first name anyway??),

    Thanks again! I see how it works now. Indeed postfix is not necessary and I use my own exiting MTA for restores. I just have to authorize this IP and I am done. Setting the PILER_HOST did the trick (overlooked that one I guess, was kinda late), so this one is fixed and can be closed as well!

    Offtopic, say I use it for a while to test drive it and I want to clean up and start over again, what do I delete? Do I just recreate the database? And what do i do with sphinx in that case?

    Grtz, Ronald

  5. Ronald Top

    Another SMTP question, suppose I only want to enable this for certain domains or addresses, how do I cope with that? Since postfix can only do 'always_bcc'. Not rule based. I thought using another postfix instance that only accepts mail from certain domains or recipients and have that mail forwarded to piler. But I don't know what that will do with the envelope. Or is there something else I can do? Will piler skip mail that doesn't match a user or domain? Thanks!

  6. Janos SUTO repo owner

    You can get my firstname from "piler -V", anyway it's Janos :-)

    How to clean up the archive? I've just added this info to the FAQ, see Q9.

    Piler by default archives everything it receives. However you may tweak piler to archive emails selectively. To do this make sure you have all your archiving domains added at administration / domain. Finally set archive_only_mydomains=1 in piler.conf, and restart or reload piler.

    Then I recommend you to watch the mail logs to verify that piler archives only emails either sent from or received to your chosen domains.

  7. Ronald Top

    Hi Janos,

    Cool! Is it also in the planning to create a filter based on created users instead of entire domains? Eg. archive_only_myusers=1 So you have even finer control.

    And what do I fill in in the user fields? I have Domain, Search domains and Domain(s) to choose from? A search does not reveal in a hit (yet)?

    And is the archive_only_mydomains a feature of piler_1_23 as well? Didn’t go for 1_24 because of the segfault issue.

    Grtz, Ronald

  8. Ronald Top

    Hi Janos,

    Sorry for bothering this much. But as a front end relay I use a combination of Mailscanner and postfix. Mailscanner runs spamassasin and clamav. But I don’t know what happens with the spam with the always_bcc rule. If spam is bcc’ed to piler, then I need a second MTA instance I guess where clean mail arrives, and in this instance set the always_bcc option.

    What is your opinion?

    Grtz,

    Ronald

  9. Janos SUTO repo owner

    You may use the archiving rules to create another layer of rules what to exclude (=not archive) from the archive. You may set rules based on email addresses, subject, size, attachments, etc.

    However this feature is for the administrators. The whole purpose of an archive (actually any archive) is to create a secure archive where emails sit for their specified retention times. And if a user can tweak what piler should archive, it would definitely cause compliance issues, since users could break the corporate policy for archiving.

    The archive_only_mydomains feature was added after 0.1.23, but I recommend you to get the latest master branch. Eventually I managed to fix the segfault problem.

    And as for the user fields, I recommend you to not add users manually except a few administrators and auditors, but not regular users. The recommended approach is to keep them in your current corporate database, eg. openldap, Active Directory, etc.

    However if you want to add regular users for any reason, then just add their email addresses (besides username and password), and you are done.

  10. Janos SUTO repo owner

    I personally believe that the best way to deal with spam is to forward them to a quarantine. This way neither the users nor the archive can see them.

    If you can't do this for some reason then you may add a retention rule for recognized spam emails, and assign a let's say 15 days of expiry date for them, and run every night the purging utility to get rid of them.

    If spamassassin puts "X-Spam-Status: Yes" to the mail headers, then add or set the following in piler.conf:

    spam_header_line=X-Spam-Status: Yes

    This also has an effect of that known spams are visually indicated in the gui, so a user may notice immediately if there's a spam within the search hits.

  11. Ronald Top

    Hi Janos,

    To upgrade to the master branche, does this only go via 1.24 first? And is it recommended to reconfigure sphinx to use the delta-delta-delta main scheme?

    For the user part I need to integrate with AD, bcoz we run mainly Windows.

    Grtz, Ronald

  12. Ronald Top

    Hi Janos, And how do I get a copy of the master branch? It says git fetch but how and where.. ? No idea! Do I need a git bash or something on my box?? Grtz, Ronald

  13. Janos SUTO repo owner

    Hello Ronald, this url (https://bitbucket.org/jsuto/piler/get/master.tar.gz) always points to the latest master branch. It's a tar.gz file, no need for git or anything unusual.

    Regarding the upgrade: if you have 0.1.23, then you have to perform all intermediate steps, ie. perform the upgrade steps written in 0.1.23 -> 0.1.24.

    If you are just evaluating piler, and have only test emails so far, then it may be easier to drop everything, and install the master branch from scratch.

    If you use vmware vsphere, then consider the OVA images I prepared (see the download links in bitbucket).

    Regarding user auth. If you have AD, the LDAP authentication is preferred (or even SSO), but for now I'd recommend to stick to LDAP auth.

  14. Ronald Top

    Hi Janos,

    I will try the upgrade the hard way without the OVA’s. I just want to get myself acquainted with the software, and I m kinda new in open source land, did mainly Windows till now, so for me these are learning points as well. Thanks for helping me out all along.

    I will let you know how the upgrade goes.

    After the upgrade it’s time for LDAP auth and maybe SSO. Speaking, we have some users that only use Outlook Anywhere, can these credentials be passed on as well?

    BR, Ronald

  15. Janos SUTO repo owner

    No problem, and good luck with the upgrade.

    I'm not familiar with Outlook Anywhere, but I believe that it should work.

  16. Log in to comment