Menu

#119 Mails are getting sent directly instead of one per minute when using --client-filter exit:102 and --poll 60

v1.0 (example)
open
nobody
None
5
2025-09-22
2025-09-19
No

Hello Team,
We are looking for a solution that acts as an SMTP "proxy" for our application to be able to send emails to, which then get forwarded to another mail server. E-MailRelay looks exactly like the solution we were looking for, but we currently have one problem:
We need to rate limit the number of outgoing emails by using the parameters "--client-filter exit:102" and "--poll 60" but every 60 seconds all emails in the queue are getting sent instead of only just one.
Basically the same setup and problem as mentioned by someone else in ticket #62. But we do not have "forward-on-disconnect" enabled.

For testing purposes I am starting the application with this command:
.\emailrelay.exe --as-server --poll 60 --forward-to mail.domain.com:25 --spool-dir C:\ProgramData\E-MailRelay\spool --client-filter exit:102 --client-auth C:\ProgramData\E-MailRelay\emailrelay.auth --client-tls --remote-clients --verbose --log --log-file "C:\ProgramData\E-MailRelay\emailrelay-log-%d.txt" --log-format time
But every polling cycle instead of one mail. all mails are getting sent.
Could you please tell me, what we are doing wrong?

Thank you in advance.

Kind regards
Robin

Discussion

  • Graeme Walker

    Graeme Walker - 2025-09-19

    I looks like that functionality was accidentally dropped in v2.5. Apologies.

    The fix in src/gsmtp/gsmtpforward.cpp is to check the filter's special-handling flag before sending the next message, which is on line 291 for v2.5 and line 295 for v2.6:

    if( special || !sendNext() ) // v2.5 line 291
    if( info.filter_special || !sendNext() ) // v2.6 line 295
    
     
  • Graeme Walker

    Graeme Walker - 2025-09-20

    I have added the fix to the V_2_6_fixes branch in the sourceforce subversion repository, with a self-reporting version of "2.6b". It is also in HEAD in the two github repositories (graeme-walker/emailrelay and graeme-walker/emailrelay-build). The emailrelay-build repository update has triggered a windows build with the built binaries available under actions->v2.6b->artifacts->executables.

     
  • Robin Hartmann

    Robin Hartmann - 2025-09-22

    Thank you for the very fast fix. I can confirm, that it works now as expected.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.