Red Hat :: Discard Outgoing Mail In Postfix That Have Some Specific Content In Attachment?
Jul 30, 2010
Working in a SW company. guys transfer their codes through email outside the company. mailserver running on postfix. Is there any method to filter mails according to contents of attachment not by file extension.
I'm setting up a server and trying to make it *very* secure. Before I configured my web stack, I was about to install some security packages, Tiger and Samhain, but these packages wanted to install sendmail so that they can send outgoing notifications. From the reading I've been doing, I believe I want postfix instead of sendmail. It is my (perhaps mistaken) belief that installing postfix first will prevent them from installing this sendmail I do not want.
I want to install postfix with the following goals in mind:
* let PHP scripts send mail using the mail function.
* various system notification functions (cron, etc.) will be able to send their emails
* emails destined for root@localhost will be redirected to admin@mydomain.com
* let tiger and/or samhain send their notification emails
* NO INCOMING OR LOCAL MAIL IS PERMITTED. Because mail for my domain is handled by google apps, nobody will be checking mail on this server. Also, this server has very limited disk space. It is therefore very important that we don't have mail accumulating in boxes that will never be checked.
* no unnecessary ports, services, or cron jobs are running.
I've been reading a variety of pages that describe postfix setup on Ubuntu but these articles are imprecise, incomplete, and describe installation of things I don't want like POP/IMAP/etc.
There's also one final wrinkle. I will be setting up postfix to send via Amazon SES.
I m using sendmail-8.13.8-2.el5 along with MailScanner-4.79.11-1
i want to set a rule so that user1@mydomain.com can send only to anotherdomain.com domain. sending mail to any other domain will be rejected. can it be done by sendmail or MailScanner ??
Im trying to get postfix to filter my outgoing mail and basically drop everything that is not in my hash table.
So far I managed to get this going
Code:
Code:
Unfortunately those rules also apply to incoming messages. My goal is to disallow users on my host to change their "MAIL FROM" to anything they like and restrict them to domains I specify. I'm aware that the local part still is variable and a user of domain "foo.com" could use a email of domain "bar.com", but still some of my troubles would be solved if I get this running.
As a part of migration I am proposing different scenarios to my organization. One which is asked to prepare is to configure multiple mail servers to handle incoming and outgoing mails. Say I have -[URL], I need to have accept mails from [URL] and send mail from [URL].
I just configured my first postfix mail server today. Everything is working correctly except for the fact that on all outgoing emails instead of the mail format being user@mydomain.biz it says user@hostnameofpostfixserver. I've looked everywhere I can think and I cant see where I'm substituting the host-name of the server for the domain name of my email. Where else could it be?Below is my main.cf. I am running ubuntu 9.10.# See /usr/share/postfix/main.cf.dist for a commented, more complete version# Debian specific: Specifying a file name will cause the first# line of that file to be used as the name. The Debian default
I would like to set disclaimer like content in my meral mail server, so that all the users should be able to get that content automatically in their outgoing mails.
Is it possible to have procmail make a decision based on the content of a attachment? My situation is the following, I dailty receive a email from a server on which a backup job of a Progress database is run. This job e-mails the results of the backup in an attachment, based on the result I would like to change the header of the message stating that the backup finished successfully or not.
I am running in a problem that i have put a postfix regex which needs to discard emails having no subjects, while it works fine for gmail,hotmail and other domains but it does not work for [URL] ultimate reason behind this is because yahoo does not send subject line if subject is not included in email.
How would one setup a header_check that would discard all emails that have more than 6 words in it? Such as, if there are more than 6 spaces in the entire message it would be deleted? I cannot find this out but it would reduce my spam intake by 50+ a day.
I had setup postfix and spam assassin, and in my environment, I forward the incoming email to my exchange server.
Everything works now, in my mail box, I can receive the email with subject ******SPAM*****. but is there a solution, when spam assassin finished the scan and mark spam, if the score is very high, may be stop to forward it to exchange, for example, send it to a special email box?
I've just setup a new Ubuntu 10.04 LTS server on linode for myself. Followed an excellent instruction at: here to finish the installation of some basic stuff including postfix.
I am trying to figure out a way to send an email to my gmail address with an attachment, but cannot find how. Already confirmed that email can reach my gmail account.
In the end I have to use mutt to send the email with attachments, probably SendEmails will also do well, but I am wondering how to do the same thing in postfix from command-line?
My script collects information and writes it to a xls file and should mail it across. I tested the first part of the script which writes the excel file , it does write the excel file fairly with expected data using Spreadsheet::WriteExcel module Second part uses MIME::Lite , All I get is a mail with intended subject intact but without the attachment . Following is the code , I have googled and tried out many options , didn't go any further apart from receiving a mail without attachment.
use MIME::Lite; $msg = MIME::Lite->new( From => 'xx', To => 'xx',
how can attachment sends through mail command in linux with mail command either with mail -s or -v option also please confirm how to download the attachments from it . and how one should knows with mail command that attachment is present with the particular mail
im unable to forward a mail with attachment my problem is as below cat /root/data|mail -s "subject" [URL] its not forwarding mail and not throwing any error my attached file is more than 100MB ,will any one me with correct syntax how much length of file can be attached maximum i also tried like this mail -s "subject" [URL] < /root/data its also not working
user can not see the correct file attachment in web mail which showed "winmail.dat" but works fine after downloaded to outlook. and the email is sent from microsoft outlook in "HTML" format(not RTF format). Any one could give me a solution figure it out, because there is quite a lot of user in my company have to use web mail and got this winmail.dat problem
Using normal bash tools (ie, built-ins or commonly-available command-line tools), is it possible, and how to extract/save attachments on emails?
For example, say I have a nightly report which arrives via email but is a zip archive of several log files. I want to save all those zips into a backup directory. How would I accomplish that?
I'm running a blog on posterous. Some friends of me post messages there via mail, mostly with some PDF attachments. These PDFs are generated mostly on a MAC with Word. The standard extension of these files is foobar.doc.pdf. Unfortunately, Posterous ignores attachments with the extension .doc.pdf.
So, I'm looking for some workaround. For example, I could my web server with some script, which receives these mails, converts the filenames of the attachment in some way and posts the result to my posterous blog. Therefore I'm looking for some mail processing scripts, which enable me to do so.
I have postfix installed on my computer to let scripts send email. I want to use my isp as the smtp server. In /etc/postfix/main.cf I have told postfix to use gmail as my smtp server using "relayhost = outgoing.verizon.net". However, when I send an email, it gets returned. The full email is included below (my server's address has been replaced with ***.com).
[code]...
I believe that I need to authenticate to [URL]... from postfix, but I am not sure how to add these directives to the config file.
so i set out to change the default smtp port the server uses because my ISP blocks port 25 and i need the email to work in outlook. this morning i could receive email, but not send it. so i did some research and thought that i needed to edit the master.cf file in /etc/postfix/ by commenting out this line: smtp inet n - n - - smtpd -oand replace it with587 inet n - n - - smtpd (587 being the port i want to use)somewhere along the lines postfix server stopped running and now i cannot get it to start.if i try using SSH it crashes immediately and if i restart it in simple control panel nothing happens
I have ubuntu 10.04 on my HP Compaq laptop, and use evolution mail. Is there a way to delete an attachment I received, while keeping the rest of the body of that mail?
I have CentOS 5.3 ISPConfig 3 installed. I have noticed that some mail I sent out were lost. Expecially, email with subject like "a" or "aa". I think Amavis block my email. Please tell me how to configure amavis to allow all outgoing email by postfix?
I have a linux server set up with postfix, which sends emails to our mail servers (MS Exchange). The linux server itself generates a lot of emails, and I would like to limit the number of mails it can send out pr second so that it doesn't spam our mail servers. Anyone know how I can control the max number of outgoing emails my linux server can send? As of now it's possible for my linux server to cause a denial of service attack on our Exchange server since I have no way of controlling the rate of outgoing messages.
I have a postfix system that sends allot of emails to customers and web site visitors. A lot of visitors just enter an invalid email in the WEB form just to download some files or do other tasks. Is it possible to BLACKLIST specific email addresses so the system does not send to those addresses? I can grep from the postfix mail log all those fake emails and place them somewhere.
eth0 192.168.2.100 (internal Web, Mail) eth1 192.168.3.100 (Default Gateway nic for clients) eth2 192.168.3.110 (should be default Gateway for all outgoing traffic not belonging to 192.168.2.100 and 192.168.3.100)
They are all on the same machine
i cannot set eth1 or eth2 as default gateway, as outside requests to eth0 would be handled in a false manner (somehow)
is there an easy iptables-rule to say, that outgoing traffic, not belonging to my networks can be redirected to a specific NIC (eth2)?
I managed to get my hylafax server nice and going, I also setup up AvantFax and Faxy to reach it from the web..What I still want to do it to send a mail from my blackberry device with a JPEG attachment, and have it forwarded as a FAX to the recipient fax machine...
I read and saw a few documentation here and there, but it is very confusing for me...
courier-faxmail seemed nice, but it conflicts with Hylafax..
Hylafax help support is unclear to me...
I'm not sure jpg attachments from blackberry are "standard" jpg, and, I have no idea how to forward this as a fax...
For what I understood, I need to have a running mail agent on my server, and a script to forward this to hylafax..
I finally got E-mails fetched downloaded to local disk, now a further thing that I would like to do is to rip off the attachments to save as its original file name and extension.A E-mail like this for example:
Code:
From root Thu Apr 7 17:21:34 2011 Delivered-To: ted_chou12@tedchou12.cz.cc Received: from pop.gmail.com [74.125.155.109]