Koozali.org: home of the SME Server
Obsolete Releases => SME Server 7.x => Topic started by: Stuart on October 20, 2011, 12:48:01 AM
-
I need to drop email from a particular external user without sending a reject or bounce to them.
Anyone have an idea on how to do this?
Thanks
-
I have created a rule that adds 999 to the spam score for a particular email address. I now need to use the cutofflevel.
I have used it on non SME servers. It doesn't appear to be used in SME and searching Contribs.org yeilds no results.
-
You could create a .qmail file for that account in the user space of the user, this should make qmail think it delivered the mail where it will not be saved. See also: http://www.lifewithqmail.org/lwq.html#throwing-messages-away.
On SME Server this could be done by setting the email delivery for that account to anything else then local or both according to the 90local template fragment:
[root@smetest ~]# cat /etc/e-smith/templates-user/.qmail/90local
{
# vim: ft=perl:
return '# No local delivery'
unless ($props{EmailForward} =~ /^(local|both)$/);
return './Maildir/';
}
[root@smetest ~]#
Something like this should do that trick:
db accounts setprop username EmailForward blackhole
signal-event email-update
-
Hey Cactus,
I think you misunderstand. The email address is not on our domain. What I'm after is a way to blackhole all email from someone like bill.gates@microsoft.com or some.clown@hotmail.com regardless of who it is sent to on our domain.
The server is to accept the email connection and return o.k., then simply drop or delete the email.
For the record, I am aware this is bad practice, but it is what has been asked of me.
Stuart
-
You can create a custom template fragment for /var/qmail/control/badmailfrom - but that will cause a reject notice to be sent to the sender.
To avoid the reject notice, your system has to accept the message, then just not save it into a folder. I think you would need to have a custom qpsmtpd plugin to do this with SME server.
-
Thanks Charlie. That was pretty much the conclusion I had come to. I was just hoping there was a simpler way to do it.
-
Two things,
I have created a rule that adds 999 to the spam score for a particular email address. I now need to use the cutofflevel.
Then you should be able to configure the Spamassassin, and that works.
or what about blacklisting the email address in webmail ?
-
I had wrote a program for windows some time back to pop sme server account and delete certain mail using the subject descriptions or the sender.
The program i wrote was written in powerbasic.
Here is some php source code that might be helpful to clean out some emails, if that helps you.
http://www.weberdev.com/get_example.php3?ExampleID=4015
-
i have written a program for windows that will delete any email from any sender to a given certain user email account where the subject line matches.
example of the program command line as follows
pop3delete myserver.com username userpassword "Cron <root@server> run-parts /etc/cron.daily"
this will delete all emails from any sender to the username email account with the subject line "Cron <root@server> run-parts /etc/cron.daily"
i do not want to post my server web here, maybe i can list the base64 here.
any suggestions for those who want the program welcomed
the program is 46,080 characters in size.
the program is best if used inhouse and does not use pop3s(ssl), it only uses pop3
-
removed
-
removed
-
i used this site to convert(encode and decode) the base64
http://www.motobit.com/util/base64-decoder-encoder.asp
at this point in time, all you have to do is paste your base64 code in the textbox, click on encode and export to binary file.
the file created will need to named to pop3del.zip and have a file size of 27,294 characters.
in windows, from the command prompt i used notepad to open a file such as temp.64
notepad temp.64
from this forum, click on select in the first post of the code, then paste in notepad
go to the bottom left of the text in notepad and do the same for the second posting.
again, past the second posting starting at the left column.
now, go to the bottom, removing all blank lines if any, the right click on the mouse to select all using copy and paste
paste the text in the website give above and select the options on the webpage that are appropriate
i have tested the above steps and created an exact file with the exception of file timestamps.
-
Stuart, sorry i misread your post in what you where doing. It was really late in the morning and i was so tired. But i did want to share that code anyways that posted.
I do not know of the number of email account users you are trying to block these messages from getting to.
I think i will write another program in an effort to delete email from a particular email account in much the same fashion as my program deletes emails using a subject.
I do have the program where you can do subject line matching but that can easily wipe out a lot of email is not done correctly. Could you imagine matching on a single character, maybe even a space character. haha to anybody doing that, drink celebration after doing that, right?
-
i used this site to convert(encode and decode) the base64
http://www.motobit.com/util/base64-decoder-encoder.asp
at this point in time, all you have to do is paste your base64 code in the textbox, click on encode and export to binary file.
the file created will need to named to pop3del.zip and have a file size of 27,294 characters.
Wouldn't posting it on some file sharing platform been far easier?
-
Purvis,
You are insane.
I respect your effort.
-
Cactus, yes, far easier to post files on a web server, but i do not care for indexing or attacks of my web servers which are not meant for the entire world, just the users here. But i cannot control that if i post it here. base64 code will do for most power users.
Stuart, i have worked on the code already to remove emails from outside email accounts that match specifically to email accounts.
You might want those users to also look into the Pennock Email Notifier which is cheap and relatively safe for viewing emails and has some filtering capabilities.
Stuart, i have reasons to delete unwanted email's as well from specific sme email accounts and i like to clean up the "maillog" email account with these command line tools on a periodical bases.
-
removed
-
windows console programs to delete emails using pop3 protocol
programs that i have written are now at one of my servers
yes i am making the below a little hard to read for my own purposes, sorry.
financeinla at my own com site
for access to the files use, the at sign followed by Mitel followed by 123 can be used
and the subdiectory is of course smeserver
there is a brief text file at the location too, the programs have a help screen if you just type the exe file name
-
Stuart, now you can delete those emails from bill.gates@microsoft.com or some.clown@hotmail.com using the program above
pop3delfrom.exe which could be renamed to something more like pop3emaildeleteusingfromline.exe if wanted
pop3delfrom servername/ipaddress username? password? bill.gates@microsoft.com some.clown@hotmail.com
if you do not want any email from microsoft.com and hotmail.com use the following
pop3delfrom servername/ipaddress username? password? @microsoft.com @hotmail.com
or any last name gates using .gates@microsoft.com
or any last name ending with "gates" characters using gates@microsoft.com
if you want to specify bill.gates@microsoft.com try using "<bill.gates@microsoft.com>"
so you might want to try
pop3delfrom servername/ipaddress username? password? bill.gates@microsoft.com some.clown@hotmail.com "<bill.gates@microsoft.com>" "<some.clown@hotmail.com>"
the brackets are not removed prior to comparing but the closing > bracket is added to the right side of email accounts for purposes of matching from left to right if a straight out match does not occur. so, bill.gates@microsoft.com will match with bill.gates@microsoft.com> located in the from line of the email.
this program has not been thoroughly tested but tested some during development.
added:
if you use greater than or less than brackets on the command line for email addresses, you will have to enclose them in double quote marks
added:
i have modified the programs to take on a simulated mode of deleting emails
now in order to delete the emails, the first command line parameter option has to be "/d" or "/delete" or some partial spelling of "/delete" such as "/del".
also during the delete or simulated deleting, only the emails effected will be show on the screen.
i am going to place another two of my home grown programs i have written, but i am not giving away my source code.
both programs will not delete or erase any file, they are text viewers and one is a text manipulator
a program called textv.exe to display text files. i wrote the program to
clipscr2.exe will create a file if you place the file on the command line tail. i need to get rid if it doing that.
clipscr2.exe was designed to actually on deal with moving text in and out using the windows clipboard.
both program where to help me look at log and text files, so they are not meant for any files but text.
clipscr2.exe was designed to help filter and sort text information
textv.exe can filter on text by line multiple times
the file sizes you can use can be as large as the memory in your computer.
-
purvis
Serious users would not/should not consider using your your code without seeing the source code, for example to check the accuracy of the code and guard against security errors or bugs or unintended outcomes etc. It would be good if you post the source whenever you offer executable files or scripts for free to unknown users.
Having a file or two for download from your own web server is not really a security risk.
Alternatively there are many place on the Internet you can upload files to freely for download by anyone, without needing to use your own web accessible server.
-
removed
-
I need to drop email from a particular external user without sending a reject or bounce to them.
Anyone have an idea on how to do this?
Thanks
Install the Mailsorting (http://wiki.contribs.org/Mailsorting) contrib, and create global rules (http://wiki.contribs.org/Mailsorting#Create_a_global_rule) matching the 'From' addresses you want to accept-but-ignore.
-
removed
-
Purvis,
[Sentence removed by moderator because it can be construed as inflamatory comment/statement]
Why are you posting all this here? It doesn't even appear to address the original question I posted!
Why not make a Contrib or something and post it somewhere appropriate. If you think might address a query, you can then point people to it.
Once again, I respect your effort, you obviously put a lot of work into it.
Mmccarn,
Someone suggested the mailsort contrib in another topic I posted here. It seems the way to go, but; to me, the wiki instructions are incorrect. The commands as listed had to be modified to work. I set up some rules but it just succeeded in stalling the mail queue. I can't spend the rest of my life on this and the client agreed to just let it bounce.
-
Mmccarn,
Someone suggested the mailsort contrib in another topic I posted here. It seems the way to go, but; to me, the wiki instructions are incorrect. The commands as listed had to be modified to work. I set up some rules but it just succeeded in stalling the mail queue. I can't spend the rest of my life on this and the client agreed to just let it bounce.
Sorry to hear it. 'mailsorting' always looked really useful to me too, but I never feel like I understand the instructions (so I've never tried to install it)...
-
It seems the way to go, but; to me, the wiki instructions are incorrect. The commands as listed had to be modified to work.
It's a wiki, so you can comment or make changes if you think there are any errors.
-
Sorry to hear it. 'mailsorting' always looked really useful to me too, but I never feel like I understand the instructions (so I've never tried to install it)...
I have been using this contrib for a long time now, I block particular mail based on the "Email Address From" criteria using Maildrop. I recall being told by Stephen Noble (the maintainer) something to the effect that Procmail did not work so good. And yes, the Wiki are somewhat cryptic and could do with some clarification. Most of the other features of this contrib are lost on me since I do not understand how it works...
-
i have erased all base64 code and setup a server with windows console executable files that have been recoded to allow a safety measure.
please see my post above
Stuart, i mentioned that i misread your wants. Possible you did not see that.
I now know what you wanted. But if you wanted something useful to help manage those unwanted emails
in a more manual way, that is what i was helping to supply you with. I needed to program those for myself as well.
We do not use automated email readers such as OUTLOOK and whatever thanks to all the spammers and viruses from email.
These are just other tools and if a person does not like leaving passwords and user names in files, these programs can help you
over come that. The program pop3delfrom will accept up to 1000 email senders and use also domain name descriptions too in an effort to
delete unwanted mail or mail that gets placed into the mail logging user account that grows and grows.
Anyway, have a great weekend.