Tag Archives: SMTP

Eric Hammond: Using An AWS CloudFormation Stack To Allow "-" Instead Of "+" In Gmail Email Addresses

Launch Stack

Launch a CloudFormation template to set up a stack of AWS resources to fill
a simple need: Supporting Gmail addresses with “-” instead of “+”
separating the user name from the arbitrary tag strings.

The CloudFormation stack launched by the template consists of:

  • ELB (Elastic Load Balancer)
  • Auto Scaling Group
  • EC2 instance(s) running Postfix on Ubuntu set up by a user-data script
  • Security Group allowing ELB to connect to the instances
  • CloudWatch CPU high/low alarms
  • Auto Scaling scale up/down policies.
  • SNS (Simple Notification Service) topic for notification of Auto
    Scaling events
  • Route53 Record Set

This basic stack structure can be used as a solution for a large
number of different needs, but in this example it is set up as an SMTP
email relay that filters and translates email addresses for Google
Apps for Business customers.

Because it uses Auto Scaling, ELB, and Route53, it is scalable and able
to recover from various types of failures.

If you’re in a rush to see code, you can look at the CloudFormation
template
and the initialization script run from
the user-data script.

Now, let’s look a bit more in depth at the problem this is solving and
how to set up the solution.

Background

If you have a Gmail address of user@example.com, then email messages
sent to addresses of the form user+ANYTHING@example.com will also be
delivered to you. You can use any email address string after the plus
sign.

Google describes this feature in a blog post:

Append a plus (“+”) sign and any combination of words or numbers
after your email address. For example, if your name was
hikingfan@gmail.com, you could send mail to
hikingfan+friends@gmail.com or hikingfan+mailinglists@gmail.com

This is is useful for tracking where you have entered your email
address and findingout which services allow it to be used for spam.
If an email variation starts getting abused, you can automatically
filter it out in Gmail.

The Problem

Unfortunately, many web sites do not allow an email address with a “+”
when registering and will reject any attempts to use this. I don’t
know if they are trying to prevent people from using unique tracking
addresses or if they just don’t know the specification for a valid
email address
, but the end result is the same.

If we could just use a dash (-) instead of a plus, we could enter
unique tracking email addresses in each site registration.

Another example for why plus can be bad: My son added “+psat” to his
email address when filling out the written PSAT so he could track who
they sold his email address to (apparently every college out
there). The data entry person typed a “t” instead of a “+”, so
colleges started sending emails to the wrong address.

Prerequisites

The approach presented here works with custom domains set up with
Google Apps for Business. You can’t use it for individual, free
“@gmail.com” addresses without some additional work and a separate
domain name registration.

As currently written, the CloudFormation stack requires that you
already have your domain DNS handled by Route53, as the template will
insert a new DNS entry for the email relay. This functionality could
be removed from the template if you don’t use Route53.

The Solution

This CloudFormation template sets up a stack that will translate email
addresses when Gmail forwards …read more

Source: FULL ARTICLE at Planet Ubuntu

Perl : corrupted excelsheet while trying to open

By scriptscript

Hi folks,

I am trying to send the mail with spreadsheet attachment in perl.I am able to send the mail with xlsx attachment as well but not able to open the xlsx sheet.While opening the sheet I am receiving the corrupted message.

Below is the code.

Code:

use MIME::Lite;
use Net::SMTP;

### Adjust sender, recipient and your SMTP mailhost
my $from_address = 'fromemailid';
my $to_address = 'toemailid';
my $mail_host = 'smtp_ip';

### Adjust subject and body message

my $message_body = "Here's the attachment file(s) you wanted";

### Adjust the filenames
my $my_file_path = "mypath";
my $your_file_xlsx = 'myfile.xlsx';

### Create the multipart container
$msg = MIME::Lite->new (
From => $from_address,
To => $to_address,
Subject => $subject,
Type =>'multipart/mixed'
) or die "Error creating multipart container: $!n";

### Add the text message part

### Add the GIF file
$msg->attach (
Type => 'application/vnd.openxmlformats-officedocument.spreadsheetml.sheet',
# Encoding => 'base64',
Path => $my_file_path,
Filename => $your_file_xlsx,
Disposition => 'attachment'
) or die "Error occuredn";

### Send the Message
MIME::Lite->send('smtp', $mail_host, Timeout=>60);
$msg->send;


Could anyone please let me know what went wrong ?

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

Sendmail Configuration

By chpsam

Hi All,

Need help !.

I am configuring SMTP server details in my sendmail.cf

My SMTP server details are like MAC234.ad.compname.com, and i have configured my sendmail.cf with this address.

But mail address is something like user1@compname.com. Now when i run the sendmail command, i get the error that compname.com is “Unknown host”.

I am able to ping MAC234.ad.compname.com on port 25.

Where am i going wrong . Please guide me.

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

DNS server /var/spool issue

By Junaid Subhani

Hello all
Currently I am working in a live production environment with 100+ Solaris servers . The environment has one DNS server and one SMTP server.

The problem that I am facing since the past 2 months is that the /var/spool/mqueue on my DNS server keeps getting full i.e. mails with name starting with qfr & dfr keeping on gathering up and I have to manually go and delete these mails.
Some sample outputs of these mail files are given below:

Code:

root@opaldn0: /var/spool/mqueue $ cat dfr238L5KN024487
Your "cron" job on mercury0 couldn't be run
can't change directory to your home directory.
Your commands will not be executed.
The error was "No such file or directory"


Code:

root@opaldn0: /var/spool/mqueue $ cat dfr237i8iY018725
Your "cron" job on mercury1
/med/appl/debmed/bin/runReadgFileS1.sh

produced the following output:

create_log_dir.sh is already running.


Code:

root@opaldn0: /var/spool/mqueue $ cat qfr237oAtK019510
V8
T1362297010
K1362297460
N1
P120613
I0/0/16374
MDeferred: Connection timed out with mercury1.waridtel.com.
Fbs
$_mercury1.waridtel.com [172.21.5.14]
$rESMTP
$smercury1.waridtel.com
${daemon_flags}
${if_addr}172.16.2.28
S
MDeferred: Connection timed out with mercury1.waridtel.com.
rRFC822; debmed@mercury1.waridtel.com
RPFD:
H?P?Return-Path:
H??Received: from mercury1.waridtel.com (mercury1.waridtel.com [172.21.5.14])
by opaldn0.waridtel.com (8.13.8+Sun/8.13.8) with ESMTP id r237oAtK019510
for ; Sun, 3 Mar 2013 12:50:10 +0500 (PKT)
H??Received: (from debmed@localhost)
by mercury1.waridtel.com (8.14.4+Sun/8.13.8/Submit) id r237o5Dc026496
for debmed; Sun, 3 Mar 2013 12:50:05 +0500 (PKT)
H??Date: Sun, 3 Mar 2013 12:50:05 +0500 (PKT)
H??From: Backend BINs operator for mediation
H??Message-Id:
H??To: debmed@mercury1.waridtel.com
H??Subject: Output from "cron" command
H??MIME-Version: 1.0
H??Content-Type: text/plain


It seems that the issue is somewhat related to crons.

Does anyone know how I can get rid of such mails ? I have to empty the /var/spool/mqueue directory every 7-8 hours since the number of mails reaches 50,000 +

…read more
Source: FULL ARTICLE at The UNIX and Linux Forums

A couple of Network issues – Please help !

By terrykhatri531

Hi,

I am using Solaris 11 and having a couple of issues with net configuration.

1. After I switched to manual network management I am getting the following error at startup :

HTML Code:

svc:/network/ipmp/default: Method "/lib/svc/method/net-ipm" failed with exit status 95.
network/ipmp:default failed fatally: transitioned to maintenance (see 'svcs -xv' for details)


svcs -xv | grep network

HTML Code:

svc:/network/ipmp:default (IP Multipathing)
See: /system/volatile/network-ipmp:default.log
svc:/network/smtp:sendmail (sendmail SMTP mail transfer agent)
See: /var/svc/log/network-smtp:sendmail.log


vi /system/volatile/network-ipmp:default.log

HTML Code:

Feb 18 15:07:02 Enabled.
[ Feb 18 15:07:25 Executing start method ("/lib/svc/method/net-ipmp"). ]
main: setup_listener failed for both IPv4 and IPv6
Feb 18 15:07:27 Method "start" exited with status 95.


svcs -l svc:/network/ipmp:default

HTML Code:

fmri svc:/network/ipmp:default
name IP Multipathing
enabled true
state maintenance
next_state none
state_time Mon Feb 18 15:07:27 2013
alt_logfile /system/volatile/network-ipmp:default.log
estarter svc:/system/svc/restarter:default
contract_id
manifest /lib/svc/manifest/network/network-ipmp.xml
dependency require_all/none svc:/network/loopback (online)


2. My net0 interfaced gets disabled with the following error :

HTML Code:

WARNING: net0 has duplicate address 192.168.001.010 (in use by 68:5d:43:e3:a3:8c); disabled


How do I find out which host/interface is using the same ip address by this MAC Address 68:5d:43:e3:a3:8c as I am unable to find this MAC3 on my network.

Here are the other statistics:

ifconfig -a

HTML Code:

lo0: flags=2001000848 mtu 8232 index 1
inet 0.0.0.0 netmask ff000000
net0: flags=4001000842 mtu 1500 index 4
inet 192.168.1.10 netmask ffffff00 broadcast 192.168.1.255
ether 0:50:56:39:73:d2
net2: flags=1000843 mtu 1500 index 2
inet 192.168.0.101 netmask ffffff00 broadcast 192.168.0.255
ether 0:50:56:34:ad:80
net4: flags=1000843 mtu 1500 index 3
inet 192.168.2.161 netmask ffffff00 broadcast 192.168.2.255
ether 0:50:56:24:2:1
net0: flags=20002000840 mtu 1500 index 4
inet6 ::/0
ether 0:50:56:39:73:d2
net2: flags=20002000840 mtu 1500 index 2
inet6 ::/0
ether 0:50:56:34:ad:80
net4: flags=20002000840 mtu 1500 index 3
inet6 ::/0
ether 0:50:56:24:2:1


ipadm show-addr

HTML Code:

ADDROBJ TYPE STATE ADDR
net0/addr static duplicate 192.168.1.10/24
net2/addr static ok 192.168.0.101/24
net4/addr static ok 192.168.2.161/24


dladm show-phys

HTML Code:

LINK MEDIA STATE SPEED DUPLEX DEVICE
net0 Ethernet up 1000 full e1000g0
net2 Ethernet up 1000 full e1000g1
net3 Ethernet unknown 0 unknown e1000g2
net4 Ethernet up 1000 full e1000g3


netadm list -x

HTML Code:

TYPE PROFILE STATE AUXILIARY STATE
ncp Automatic disabled disabled by administrator
ncp DefaultFixed online active
loc Automatic offline conditions for activation are unmet
loc NoNet offline conditions for activation are unmet
loc DefaultFixed online active


netadm show-events -v

HTML Code:

EVENT DESCRIPTION
IF_STATE net0 -> state flags 0 addr 192.168.1.10/24
IF_STATE net0 -> state flags 0 addr 192.168.1.10/24
IF_STATE lo0 -> state flags 0 addr 127.0.0.1/8


Kindly help me fix these issues.

Thank you very much in …read more
Source: FULL ARTICLE at The UNIX and Linux Forums

SELL RDP,SHELL,SSH Tunnel,CPANEL,SMTP,Email Leads,Mailer,Webmail

By brilliant92

[B]SELL RDP,SHELL,SSH Tunnel,CPANEL,SMTP,Email Leads,Mailer,Webmail

* CONTACT
-Yahoo messenger : tools_brilliant92
-Email : tools_brilliant92@yahoo(dot)com

___________RDP(Remote Desktop Protocal)____________

– RDP Australia :$10 ( Warranty: 30 day )
– RDP Europe :$10 (Europe`s Best Quality Remote Desktop Protocol Tool )
– RDP ASIA :$12 ( High Quality Remote Desktop Protocol 2003/2008 Tool )
– RDP Netherlands :$12 ( Warranty: 20 day )
– RDP With AMS & PHP Mailer Unlimited : $15
– RDP With AMS & Unlimited SMTP : $15
– RDP WIth AMS ( Germany ) : $12 ( Warranty: 30 day )
– UK RDP WITH AMS : $15 ( Warranty: 30 day )
– USA RDP WITH AMS : $10 ( Warranty: 15 day )
AMS 4.3 REGISTRATION CODE : $5

___________Shell C99____________

– Shell C99 : $10

___________Cpanel Hosting__________

– Cpanel Hosting : $15

___________SMTP (Simple Mail Transfer Protocol)________

– 5 INBOX SMTP PACK : $12 ( IP Inbox SMTP )
– Smtp Scanner (Xscan 3,3) : $25 (Scan SMTP fresh.Daily 500smtp )
– Unlimited Domain Smtp Server : $15
– IP SMTP unlimited Inbox : $8 (Can send 2k per shot ,Unlimited for the day )

___________Email Leads___________
Note:
We are committed to ensuring our emails provide you with a value of 100%. Email our regular monthly updates
* Famous websites, forums , Popular blogs , Best emails in our database
– 10,000 World ( Mixed ) Email Leads : $15
– 20.000 Job Seekers Email Leads: $20
– 10.000 Survey USA Email Leads : $20
– 10.000 Google Email : $15
– 10.000 Yahoo Email Leads : $10
– 10.000 Asia Mixed Email Leads : $15
– 10.000 Canada Email Leads : $15
– 10.000 India Email Leads : $15
– 10.000 USA Email Leads : $15
– 10.000 Arab World Email Leads : $15
– 10.000 France Email Leads : $15
– 10.000 UK Fresh Email Leads : $15

And more country ….

___________Mailer_____________

– Limited PHP Mailer : $8 (Duration 7 Days Guaranty)
( Can send upto 2k per shot and 100k per day )
– Unlimited PHP Mailer Server : $15 ( 21 days guaranty Inbox 100% )
___________Webmail______________

– Limited Webmail : $5
– Unlimited Webmail Server :$15
__________SSH Tunnelier_________

– SSH Tunnelier (Root IP USA) : $8
– SSH Tunnel( CA IP) : 10$
– SSH Tunnel(AU IP) : 10$
– SSH Tunnel(FR IP) : 10$
– SSH Tunnel(UK IP) : 10$

* CONTACT
-Yahoo messenger : tools_brilliant92
-Email : tools_brilliant92@yahoo(dot)com

Source: FULL ARTICLE at The UNIX and Linux Forums

I have firewall rules to open ports, why telnet refuses connection?

By RedSpyder

Alright… this question comes from the fact that I’m trying to setup postfix to relay messages to Office 365 SMTP but its giving me connection refused… I read that if you have doubts if your port is open or not you should telnet to them so thats what I did.

This is a Red Hat 6.3 box.

My IP Table:

Code:

# Generated by iptables-save v1.4.7 on Fri Nov 16 14:20:30 2012
*filter
:INPUT ACCEPT [0:0]
:FORWARD ACCEPT [0:0]
:OUTPUT ACCEPT [2755:248833]
-A INPUT -m state --state RELATED,ESTABLISHED -j ACCEPT
-A INPUT -p icmp -j ACCEPT
-A INPUT -i lo -j ACCEPT
-A INPUT -p tcp -m state --state NEW -m tcp --dport 22 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --dport 3306 -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --sport 21 -m state --state NEW -j ACCEPT
-A INPUT -i eth0 -p tcp -m tcp --sport 20 -m state --state NEW -j ACCEPT
-A INPUT -m state --state NEW -p tcp --dport 25 -j ACCEPT
-A INPUT -m state --state NEW -p tcp --dport 23 -j ACCEPT
-P OUTPUT ACCEPT
-A OUTPUT -m state --state NEW -p tcp --dport 587 -j ACCEPT
-A INPUT -j REJECT --reject-with icmp-host-prohibited
-A FORWARD -j REJECT --reject-with icmp-host-prohibited
COMMIT


Output of

Code:

iptables -L -n


:

Code:

Chain INPUT (policy ACCEPT)
target prot opt source destination
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0 state RELATED,ESTABLISHED
ACCEPT icmp -- 0.0.0.0/0 0.0.0.0/0
ACCEPT all -- 0.0.0.0/0 0.0.0.0/0
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:22
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp dpt:3306
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp spt:21 state NEW
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 tcp spt:20 state NEW
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:25
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:23
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain FORWARD (policy ACCEPT)
target prot opt source destination
REJECT all -- 0.0.0.0/0 0.0.0.0/0 reject-with icmp-host-prohibited

Chain OUTPUT (policy ACCEPT)
target prot opt source destination
ACCEPT tcp -- 0.0.0.0/0 0.0.0.0/0 state NEW tcp dpt:587


My telnet attempts:

Code:

[root@isvahlrtk01 logs]# telnet isvahlrtk01 587
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying 10.13.24.209...
telnet: connect to address 10.13.24.209: Connection refused
[root@isvahlrtk01 logs]# telnet isvahlrtk01 25
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying 10.13.24.209...
telnet: connect to address 10.13.24.209: Connection refused
[root@isvahlrtk01 logs]# telnet isvahlrtk01 23
Trying 127.0.0.1...
telnet: connect to address 127.0.0.1: Connection refused
Trying 10.13.24.209...
telnet: connect to address 10.13.24.209: Connection refused
[root@isvahlrtk01 logs]# telnet isvahlrtk01 22
Trying 127.0.0.1...
Connected to isvahlrtk01.
Escape character is '^]'.
SSH-2.0-OpenSSH_5.3


Even though I have rules for ports 587,25,23… why can I only telnet succesfully only on port 22?

Arent I supposed to telnet all them correctly since I have firewall rules?
Could it be that my company is blocking those ports in THEIR firewall?

Source: FULL ARTICLE at The UNIX and Linux Forums

Problem setting up SSMTP with Office 365

By RedSpyder

Hi guys!

Im trying to setup my box so it can send its emails through Office 365 SMTP. I spent 8 hours yesterday trying to configure sendmail to do this, but I gave up.

Now Im trying to do it with SSMTP and I followed this guide to configure it How to install and configure sSMTP on CentOS / Fedora / Redhat | TechGyaan

This is my configuration:

Code:

root=email@mymail.com
mailhub=pod51011.outlook.com:587
AuthUser:User
AuthPass:Pass
FromLineOverride=YES
UseSTARTTLS=YES


But then in the logs I get

Code:

Jan 3 08:39:07 isvahlrtk01 sSMTP[7263]: Unable to connect to "pod51011.outlook.com" port 587.
Jan 3 08:39:07 isvahlrtk01 sSMTP[7263]: Cannot open pod51011.outlook.com:587


What could be happening?

Source: FULL ARTICLE at The UNIX and Linux Forums