Tag Info

New answers tagged

1

If you really want to do that ("expect the users of my script to need to specify the address they want to use"), you can always ask them to put their email-address into ~/.emailaddress or another local file. With adequate permissions on their home directories and that file, this could work. The proper way would be to set up local mail delivery and leave it ...


1

There's no such thing. You can, though, expect a mail attribute to exist in an LDAP directory, as per RFC 4524. There are command line tools, like ldapsearch(1), you can use in a shell script to retrieve those values. Of course, you could also store user information in a database elsewhere.


0

In your .muttrc: set mbox=imap://imapsrvr/INBOX set record=imap://imapsrvr/INBOX set spoolfile=imap://imapsrvr/INBOX set postponed=imap://imapsrvr/INBOX though I've never seen what mutt would make of the inbox being your drafts folder. I assume it will treat all emails in your inbox as drafts (untested).


0

Procmail can be used to do this, but will need and Envlope-to header added by the MDA. It may be simpler to setup virtual domain aliases in the mail server. Exim4 supports different aliases for different domains, but needs some setup to do so. I would expect this capability from Postfix and Sendmail as well, although I haven't multiple domains with ...


0

# Allows SMTP access -A INPUT -p tcp --dport 25 -j ACCEPT # Allows pop and pops connections -A INPUT -p tcp --dport 110 -j ACCEPT -A INPUT -p tcp --dport 995 -j ACCEPT # Allows imap and imaps connections -A INPUT -p tcp --dport 143 -j ACCEPT -A INPUT -p tcp --dport 993 -j ACCEPT replace smtp access with this line in iptables. comment out old line or ...


0

A popular technique is to add an MX record that points to the root domain: yourdomain.com. IN MX 10 . There's no A record for the root domain, so this should cause a failure. However, spammers may know about this trick, and ignore this MX record. Another technique that some use is to point it to localhost: yourdomain.com. IN MX 10 ...


2

That date is found inside the email headers. They look a bit like this: Received: from mail-pd0-f170.google.com (mail-pd0-f170.google.com [209.85.192.170]) by mailserver.example.com (Postfix) with ESMTP id DCFEE3983D for <someaddress@example.com>; Tue, 23 Jul 2013 20:32:34 +0200 (CEST) Received: by mail-pd0-f170.google.com with SMTP id ...


0

If the domain is not supposed to send or recieve email, it should not have an MX record. Spambots may still try to use the A record to locate it and send email to it. Consider adding and SPF (Sender Policy Framework) record of the form "v=spf1 -all", which will indicate the domain does not send email. DNS has an SPF record type for this, but many tools ...


0

You should not do that without the consent of the other party but it is possible to point the MX to a wrong host i.e. one not configured for this domain which will refuse accepting this mail (though I am not sure whether the A record is tried then instead) or to one with a mailserver which just throws everything away. Pointing to a host without a reachable ...


4

You can use nc to test a SMTP mail server like so: $ nc -w 5 mail.mydom.com 25 << EOF HELO mail.mydom.com QUIT EOF NOTE: The options -w 5 tell nc to wait at most 5 seconds. The server to monitor is mail.mydom.com and 25 is the port we're connecting to. You can also use this form of the above if you find your server is having issues with the HELO: ...


0

If your mail don't support -a option, do it with uuencode: uuencode original_filename attachment_filename | mail -s "subject" recipient@xyz.com for example (it's working in front of my eyes): uuenconde ~/.netrc mynetrc.txt | mail -s "test" xyz@xyz.com and I see the attachment as mynetrc.txt in the mail.


1

To wrap the text file you can use fold (see fold man page) For example fold -w 78 -s input.txt > wrapped.txt will wrap your text to a maximum width of 78 characters. You can then use zip to compress it zip wrapped.zip wrapped.txt and then send it per email with mail mail -a wrapped.zip -s "Subject of the mail" recipient@example.com (not all ...


2

Don't reinvent the wheel. apt-get install apticron Apticron is a simple script which sends daily emails about pending package updates such as security updates, properly handling packages on hold both by dselect and aptitude.


3

You could run multiple postfix instances, one for each customer. This would require either separate IPs or separate ports, separate queue directories, etc. Otherwise, no - this is not how it works. And it's not as if their recipients will be looking at the headers anyway, most people won't even know how to find them, so it's not an issue of presentation. ...


1

Sorry to raise the dead, but I stumbled across this via Google and have just solved it: the /etc/ssmtp/revaliases is only the aliases for the FROM: addresses. Aliases for TO: addresses would normally need to be set in /etc/aliases, but SSMTP doesn't read this! Instead, you need to edit /etc/mail.rc and add a line such as alias root ...


0

Two ideas: Setup a proxy on the VPS (use SSH port forwarding, nc, or some type of SMTP forwarder that doesn't add received headers). Write a program that runs on the VPS, have it take the emails from your and then inject the email locally (using sendmail/postfix from the command line or have it connect to localhost port 25).


0

You might like running strings on the file. This will show anything that looks like text that was compiled into the executable.


2

Nothing would happen since a .exe file is meant for Windows, not Linux, so without Wine installed, and without a association to run .exe files from your mail client these files are essentially of no consequence to you. Still as a best practice you should typically never run things directly from email. You should instead get in the habit of doing a "Save ...


3

The obvious answer is Alpine, which used to be Pine, but was freed by the University of Washington. Pine is non-free software, Alpine is free software. Alpine is quite similar to Mutt, but Mutt is generally considered to be more powerful and flexible. The current active branch of Alpine is a fork called Re-Alpine, since the University of Washington has ...


1

As suggested by @Gilles, I'm leaving here what I did so others can benefit from it. My machine's host is abcxyz.ovh.net and the user I was trying to block was foobar. I ended up creating /etc/postfix/sender_access with the following content: foobar@abcxyz.ovh.net Then I compiled it with postmap /etc/postfix/sender_access. Finally, I added this to my ...


1

If your ISP is blocking traffic that you send destined for another host's TCP port 25, you will not be able to set up an outbound mail server. Conversely, if they are blocking inbound connections to your TCP port 25, other mail servers would not be able to deliver messages to you. Additionally, it is typically not very effective sending mail directly from ...


1

I actually found it out by myself. The rule must be: Channel movetoroot Master :remote:INBOX/ Slave :local: Patterns * !INBOX


0

Certainly possible, I have 2525 as my SMTP port. Another option is 465 for SMTP over TLS and 587 as already mentioned. Have you checked the home router is not blocking the relevant packets to your Pi? Check the target port is open with telnet. Through a mobile connection try and talk via telnet to the home system on that port. Check home ports up (Debian); ...


0

Port 25 is now generally considered "legacy SMTP". All my new SMTP boxes have used port 587 for some time now. There is nothing non-standard about it, in fact it is considered the norm today. See Wikipedia's list of ports.


1

The solution was that I needed to add the following to my crontab, in addition to MAILTO: MAILFROM=cron@domain.com



Top 50 recent answers are included