Troubleshooting email issues with PaperCut NG/MF

PaperCut NG/MF can be configured to send notifications over email using the Simple Mail Transfer Protocol (SMTP). These settings are configured on your PaperCut server in Options > Notifications. The how-to of configuring these settings is explained in our manual here.


Once these settings have been configured, PaperCut NG/MF can send email messages to users or admins when their attention is required, for example when a user is out of credit or when a printer is out of toner. This mechanism is also used when Integrated Scanning is configured with a “Scan to Email” action or when emailing scheduled reports.

Testing email notifications

The first step when troubleshooting is to confirm these settings are correct by sending a test notification via email. Do this by logging into your PaperCut NG/MF server as an administrator, then navigate to Options > Notifications > Test Notifications. Enter a destination email, set the test message to be sent ‘By Email’ and then press Send Test Notification.


If that’s not working as expected, then read on to get a few ideas about what you should check next…

Common email issues

  • Email notifications suddenly stop.
    • Check to make sure the PaperCut server still has internet access, and the username and password in the SMTP server options is still current and correct. Many environments may have passwords set to automatically expire after a certain period like 60 days. If this is the case, make sure you set a reminder to update the password in the PaperCut SMTP Server Options as well.
  • Emails take 2–3 hours to arrive.
    • Is your email provider or spam filter “graylisting” emails? This is a spam prevention technique that involves slowing the rate of emails from extremely busy accounts.
  • A specific user is not receiving emails.
    • Check to make sure their user account in PaperCut is configured with the correct email address. Make sure the emails are not going into their Junk, Clutter, or Spam folders. Ask the user if they have any rules set up in their email client that might be deleting or moving these messages.
  • Scan to email fails when the scanned files are too large.
    • Many email systems and spam filters are configured to filter out attachments over a certain size to prevent user’s mailboxes from filling up too quickly. PaperCut NG/MF is also configured to have a file size limitation of 20MB for Integrated Scanning, and sometimes scan jobs may exceed this size. First confirm that your email system allows attachments of 20MB or greater, before also configuring PaperCut to allow a larger attachment size Using the Config Editor increase the value for the key system.scan.email-max-job-size-kb (20480 is the default).
  • Scan to email fails when configured to send from the “User’s email address”.
    • In this situation test emails from the server work, but an Integrated Scanning action to scan to an email address fails. Why? Many email systems don’t allow one account to send on behalf of another user’s account. We find that customers who migrate from on-premise Exchange servers to cloud-based Office 365 encounter this hurdle. We describe this situation in greater detail in our article Integrated Scanning to Email with Office 365.
  • The email returns a SMTP status code as part of the error.
    • The SMTP protocol uses a standardised set of response codes which translate to specific error messages that can help you determine the root cause of the email problem you’re having. We would recommend looking at external resources for further information on these.

Looking for SMTP errors in the logs

When PaperCut NG/MF tries to deliver email notifications and/or reports, the following error can occur when there are problems connecting to the SMTP server in the server.log files.

Please note: The use of smtp.server.name in this article is a placeholder SMTP server name. Please use your own SMTP server address when troubleshooting.

Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.server.name, port: 25; nested exception is: java.net.SocketException: Software caused connection abort: connect.

or

Mail server connection failed; nested exception is javax.mail.MessagingException: Could not connect to SMTP host: smtp.server.name, port: 25; nested exception is: java.net.SocketException: Connection refused: connect.

When you receive this error, first check that the SMTP server is set correctly. After using the Test Notifications feature and verifying that the test notification emails deliver successfully, then the next most common causes of this error are:

  • There is antivirus software running on the PaperCut NG/MF server that does not allow outbound SMTP connections. This is common because many viruses and spyware use email to spread themselves. After verifying whether this is the case by disabling the antivirus software temporarily, add an exception/white-list that will allow PaperCut to make the necessary connection.
  • There is a firewall that is blocking the connection. Make sure your firewall allows these connections.
  • The SMTP server itself is not configured to allow connections from the PaperCut NG/MF IP address.

One way to quickly test if you can connect to the SMTP server on port 25 from the PaperCut NG/MF server is to type the following into a command prompt window, for example: telnet smtp.server.name 25

If the screen goes black, then the connection has been established successfully and PaperCut NG/MF will also be able to connect.


No SMTP server defined

When setting up PaperCut NG/MF’s email notifications features, customers may experience an issue when using some types of antivirus or malware software that intercepts SMTP connections.

Error sending email: Failed messages: com.sun.mail.smtp.SMTPSendFailedException: 550 No SMTP server defined. Use a real server address instead of 127.0.0.1 in your account.

The above error message indicates that the Java back-end of PaperCut is refusing to use 127.0.0.1 as a SMTP server. This has previously been caused by antivirus software intercepting the SMTP connection and redirecting it locally rather than to the customer’s specified SMTP server. Investigate your antivirus software on your PaperCut Application server or SMTP provider to allow these connections.


Error Message: “MessagingException or SocketException when an email notification is sent”

When receiving the error messages the expected email never arrived. This error indicates that the SMTP server is either not accepting a connection or is rejecting it. Some common causes are:

  • The hostname or IP address of the SMTP mail server is incorrect.
  • Your server doesn’t accept plain SMTP connections from your local IP addresses (that is, from your PaperCut server). That’s because some SMTP servers require users to authenticate first via POP or another SMTP handshake.
  • Your SMTP server has a firewall enabled. Make sure it can accept connections.
  • Check the logs on your SMTP server. These logs may give a hint to the cause of the rejection.

How to enable SMTP debug mode

Please note: The steps below require you to download the debug mode diagnostics bundle as the final steps of retrieving your logs to provide to the PaperCut Support Team. We recommend enabling debug mode on the PaperCut Application Server before enacting the following procedure.

If your SMTP problems above don’t match any of the error messages or problems mentioned above, you may be asked by the PaperCut Support Team to enable SMTP debug to allow a deeper insight into the SMTP communication. To enable this:

  1. Log in to the PaperCut NG/MF Server as a PaperCut Administrator.
  2. Navigate to the following areas: the Options tab > Actions > Config editor (advanced).
  3. In the “Quick Find” search box, type the search term “’smtp”, and click Go.
  4. Change the value of notify.smtp.debug from N to Y, and click Update.
  5. Click Apply at the bottom of the page.
  6. Attempt to reproduce the SMTP issue you’re having.
  7. Download the debug .zip file from your PaperCut NG/MF server to share with the PaperCut Support Team. This is found in Options > Advanced > Diagnostics > Download Diagnostics file.

Enabling this will create additional verbose debug logging of the SMTP communication in the service.log files founds in: [app-path]\PaperCut NG/MF\server\logs\


Still have questions?

Let us know! We love chatting about what’s going on under the hood. Feel free to leave a comment below or visit our Support Portal for further assistance.


Categories: Troubleshooting Articles, Notifications , Logs

Keywords: email, e-mail, smtp, pop3, imap, notification, mail server configuration, connection, socket, debug


Comments