Archive forDecember, 2008

421 Message temporarily deferred – Yahoo

I hate to see this: 421 Message temporarily deferred – Yahoo

Every time, when check on the email issue, shit, again, yahoo deferred..how to solve!route again?

I have found a solution, but still need to have many extra/dedicated IP to solve it.

Now, cpanel has made lots of changes to its MTA (exim) ACL’s to deal with this issue. Cpanel allows us to use different IP for each domain hosted on a shared hosting account if they buy a dedicated IP. These IP’s are listed in a file called /etc/mailips. If the domain name is not associated with a dedicated IP in /etc/mailips, MTA will use servers main IP to send out that email.

For sending from nobody (for php script), PHP sends email as the user nobody (web server user), hence the emails needs to be sent out via server’s main IP.   Customer had no dedicated IP allocated to his domain and even if he has got one as php is sending out email as nobody. how to solve?

Answer:
Adding entry in /etc/mailips (I found it empty) and add the host name with the secondary IP which was found on the server as follows :

server.hostname.com : <new IP>

Solve

~End~

 

Comments

cpanel: Install SPF records on a cPanel server

Just read about one interesting article about install spf records oon a cpanel server

simple SPF syntax: domain.com. 14400 IN TXT “v=spf1 a mx -all”

Definition:
* v=spf1: using spf version 1
* for domain “domain.com” the fallowing IP’s are allowed to send email: the A record IP and the MX record IP’s.
* “-all” – no other IP’s are allowed to send emails

By default, we can log in to the WHM > Edit DNS Zone to add the SPF record. But, if we have 100000 domain need to have SPF setting, how to solve?

Let's try this:
cPanel has built a script: /usr/local/cpanel/bin/spf_installer to install a SPF record for a given cPanel user

But as read, the script is still under Beta version, so it will have some bug, it will only work with your subdomains, addon or parked domains.

This is because, the above script is trying to add to the DNS zone a record like this:

    domain.com 14400 IN TXT “v=spf1 a mx -all”

The correct syntax would be:

    domain.com. 14400 IN TXT “v=spf1 a mx -all”

What is the difference between the two syntax ? The first ones is missing the dot(.)

Anyway, there is a solution to solve this:
1.Login as root on the server using ssh
2.We have to edit SPF.pm source file

    nano /usr/local/cpanel/Cpanel/SPF.pm

3.Locate the fallowing lines (should be at the end of the file)

    foreach my $domain (@DOMAINS) {
    push @installlist , { match => ‘v=spf’,
    domain => $domain,
    record => $domain,
    value => ‘v=spf1 a mx ?all’ };
    }

4.Replace this with:

    foreach my $domain (@DOMAINS) {
    push @installlist , { match => ‘v=spf’,
    domain => $domain.”.”,
    record => $domain.”.”,
    value => ‘v=spf1 a mx ?all’ };
    }

5.Now let’s test to see if it works. Run the fallowing

    /usr/local/cpanel/bin/spf_installer USERNAME

Where USERNAME is the cPanel username.
Now check to see if the zone file has a SPF record.

Lastly, run as root the fallowing in order to install for all the hosted domain:

    for i in `ls /var/cpanel/users` ;do /usr/local/cpanel/bin/spf_installer $i ;done
~End~

Nowadays, cpanel have the setting: Blacklist: SPF Checking at exim Configuration, but somehow as tested, it seem cant work. It didn't any blocking on sending or receiving for the domain that has SPF enable. And when trying to save the exim configuration file, it seem that it still under experimental.

Common issue on SPF: forwarding issue, Solution: Implementing SRS: http://wiki.exim.org/SRS

Comments (1)

无常

前天,girl才call我, 告诉我说,大故丈的病情,今天,就说故丈过世了。
人生无常, 好怕!!

要珍惜身边人!!你会吗?

 

Comments

bear

我的新bearbear

 

有了新的,旧的被抛弃了。。:p

Comments (1)

几号?

忘记几

Comments

Simple ASP.NET Script

System.Net.Mail (for ASP.NET 2.0) script

-Start-
VBScript

<%@ Import Namespace="System.Net.Mail"%>
<script language="VBScript" Debug="true" runat="server">
    sub Page_Load()
        Dim oMsg As New MailMessage()
        oMsg.From = New MailAddress("mailbox@yourdomain.name")
        oMsg.To.Add("mailbox@yourdomain.name")
        oMsg.Subject = "This is an email"
        oMsg.Body = "<HTML><BODY><B>Hello World!</B></BODY></HTML>"
        Dim smtp As New SmtpClient("server IP")
        smtp.Send(oMsg)
        oMsg = Nothing
    end sub
</script>

-End-

Save it as .aspx

After uploaded to the server, tried to execute it, I am getting the error
"
 No connection could be made because the target machine actively refused it 202.75.42.141:25
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.

Exception Details: System.Net.Sockets.SocketException: No connection could be made because the target machine actively refused it 202.75.42.141:25 "

Solution:

Go to you server IIS, check the virtual SMTP property and make sure that you have allow port: 25 to connect to this server IP.

ps:  easy leh, but it took me quite long time to solve it, but at least I am manage to solve it :) gambathe!!!!!!

Comments