XMailforum is a readonly knowledge archive now.

Registering as a new user or answering posts is not possible anymore.

Might the force be with you, to find here what you are looking for.

2019-09-20 - hschneider, Admin

Cookie Disclaimer: This forum uses only essential, anonymous session cookies (xmailforum*), nothing to be scared of.

XMail Forum -> xmail-1.0 Filtering on RedHat 7.0

Reply to this topicStart new topicStart Poll

> xmail-1.0 Filtering on RedHat 7.0
wmikrut
Posted: Sep 21 2001, 07:02 PM
Quote Post


Newbie
*

Group: Members
Posts: 3
Member No.: 70
Joined: 21-September 01



Ok, I previously posted that I was having some trouble recieving mail externally and internally. I have fixed that problem and all is working well.

I do have a question about filtering though. I have a file setup in the /filters directory named nightingale.com.tab. Here is the content of this file:

"/var/MailRoot/bin/nightingale.sh"[TAB]"@@FROM"


Here is what the nightingale.sh script file looks like:
#!/bin/bash
echo "Script nightingale.sh executed" >> /tmp/smtperror.log
if [ $1 = "user@nightingale.com" ]
then
exit 99
fi


My goal here would be to block any mail from user@nightingale.com - perhaps more users in the future if I required it.

Any reason why this does not work? I added the echo just to see if the script was at least being called...and it's not.

William W. Mikrut
wmikrut@wmikrut.com



Edited by - wmikrut on 22 September 2001 08:23:05
PMUsers WebsiteICQAOLYahoo
Top
Aram
Posted: Sep 22 2001, 01:33 PM
Quote Post


Administrator
****

Group: Moderators
Posts: 142
Member No.: 1
Joined: 15-February 01



Hi William,

I guess you know that '[TAB]' is a control key and not meant literally, so you should use the Tabulator key.

Another problem could be that you didn't terminate the line with a linefeed. The syntax of the file is :

"command"[TAB]"arg-or-macro"[TAB]...[NEWLINE]

I presume the script is ok since I've no experience in scripting on Unix/Linux.

- Aram Tutunciyan -
PMEmail PosterUsers WebsiteMSN
Top
wmikrut
Posted: Sep 23 2001, 05:16 AM
Quote Post


Newbie
*

Group: Members
Posts: 3
Member No.: 70
Joined: 21-September 01



Hi Aram,

Thanks for the reply!
I used the [TAB] keyword in my example for documentation purposes only. Here is the location and content of my .tab file

/var/MailRoot/filters/nightingale.com.tab
"/var/MailRoot/bin/default.sh" "@@FROM"

I made sure there was a newline in the .tab file, and I have executed the nightingale.sh script to make sure it works. I even opened up RWX authority for everyone to make sure access was not denied when the script was run.



PMUsers WebsiteICQAOLYahoo
Top
wmikrut
Posted: Sep 24 2001, 08:31 PM
Quote Post


Newbie
*

Group: Members
Posts: 3
Member No.: 70
Joined: 21-September 01



Ok, I figured out what I was going wrong... (exactly why I souldn't work on these things until I get some sleep).

I learned how to read this weekend --- and I realized I was setting up my filter incorrectly.

I needed to have a .tab file in the /filters directory for the account receiving mail. In my example - I needed a wmikrut@wmikrut.com.tab file --- then I can pass parameters and handle filtering.

I added this file - and everything works just fine.


PMUsers WebsiteICQAOLYahoo
Top
0 User(s) are reading this topic (0 Guests and 0 Anonymous Users)
0 Members:
« Next Oldest | XMail Server | Next Newest »

Reply to this topicStart new topicStart Poll