Menu

#105 No directory examples on GitHub for emailrelay-client-filter

v1.0 (example)
open
nobody
None
5
2025-03-04
2025-02-27
No

The directory /examples in GitHub is missing and we found it by trying to create a correct emailrelay-client-filter.js file.

Discussion

  • Graeme Walker

    Graeme Walker - 2025-02-27

    The emailrelay GUI installer on Windows creates an empty "emailrelay-client-filter.js" script. Is that what you are referring to? The empty scripts are created at run-time by the CreateFilterScript class in src/gui/installer.cpp, so there is no source code as such.

    The real example scripts live in the "bin" directory and they typically get installed to "/usr/lib/emailrelay/examples".

     
  • Valentin Hachen

    Valentin Hachen - 2025-02-28

    Yes thats the script that gets created while setting up the mailrelayservice. But i would like to filter the clients who are allowed to send mails to the SMTP server. Only a registered IP should be able to use the SMTP server and i dont know the syntax and where to restrict the connections. I assume it is in this file but then i have not found the syntax or an example how to do it. Thank you for your answer

     

    Last edit: Valentin Hachen 2025-02-28
  • Graeme Walker

    Graeme Walker - 2025-03-01

    I should have said that on Widows the example scripts are installed under "%ProgramFiles%/e-mailrelay/examples". You should see "emailrelay-check-ipaddress.js" in there. You can just copy it on top of the empty "emailrelay-server-filter.js" file that the installer creates and then edit the IP address.

    Note that terminology is important because the emailrelay process is typically both a SMTP server and a SMTP client. When acting as a server ("server-side") it communicates with a remote SMTP client and when acting as a client ("client-side") it communicates with a remote SMTP server.

    I am assuming that you want emailrelay acting as a server to check the IP address of the remote SMTP client that is submitted new e-mail messages. For that you need a server-side filter script, as given by the "--filter" configuration option, which defaults to "emailrelay-server-filter.js" on Windows, not "emailrelay-client-filter.js".

     
  • Valentin Hachen

    Valentin Hachen - 2025-03-04

    Yes that is exactly what i was looking for. Thank you very much and you can close this ticket ;)

     

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.