Archive for the ‘Programming’ Category

Qmail: forward emails to a PHP script

In qmail, first add the domain alias. For myscript@servername make /var/qmail/alias/.qmail-myscript If its for myscript@mydomain.com /var/qmail/mailnames/mydomain.com/.qmail-myscript should do it. Contents need to be along the lines of: |/var/www/vhosts/mydomain.com/httpdocs/script.php references: http://www.devarticles.com/c/a/PHP/Incoming-Mail-and-PHP/1/ http://forum.swsoft.com/showthread.php?t=40510&highlight=qmail+alias

Zeus 301 redirect

Add the following to rewrite.script: match URL into $ with (.*) set SCRATCH:COND = %{IN:Host} match SCRATCH:COND into % with ^domainname\.co\.uk if not matched then goto RULE_0_END set URL = http://www.domainname.co.uk$1 set RESPONSE = 301 set OUT:Location = %{URL} set BODY = Please try <a href=”%{URL}”>here</a> instead\n RULE_0_END:

mod_rewrite 301 redirect

To redirect the entire site, for example to enforce www. , add the following to .htaccess Options +FollowSymLinks RewriteEngine On RewriteCond %{HTTP_HOST} ^domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/$1 [R=301,L]

CDONTS vs CDOSYS for ASP Email

CDONTS was deprecated and replaced by CDOSYS in Winddows 2003.  You can still install and use CDONTs if you need it though.  Just google for CDONTS and register the DLL. CDONTS Example: <% Option Explicit Dim objMail Dim strSubject Dim strBody strSubject = “This is a test email in HTML format”