[Mimedefang] Testing for the existence of a header
Steffen Kaiser
skmimedefang at smail.inf.fh-bonn-rhein-sieg.de
Thu Oct 2 05:12:41 EDT 2008
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On Thu, 2 Oct 2008, Nigel Allen wrote:
> my $dirname = '"/home/plans/Maildir/.' . $pad_spno . '"';
^^ Drop the double quotes
> if (! -d $dirname) {
> return action_bounce ("You entered $spno which is an invalid
> code. Folder name was $dirname");
> }
> }
> }
>
> I got the "staff_codes" thing working (thanks to previous assistance here)
> but when I test the folder part I get the following displayed:
>
> Oct 2 13:24:12 sydsrv01 sendmail[7872]: m923OA78007872: Milter: data,
> reject=554 5.7.1 You entered 226 which is an invalid code. Folder name was
> "/home/plans/Maildir/. 226"
>
> But the folder definitely exists. Is this something to do with the difference
> between ' and "?
No, but you use two quotes at once.
> If I copy the message portion and test it I get this:
>
> [root at sydsrv01 mail]# ls -ld "/home/plans/Maildir/. 226"
> drwxr-xr-x 2 root root 4096 Oct 2 12:47 /home/plans/Maildir/. 226
OK, but the shell interpretes the double quotes itself, they are not part
of the filename, which ypu can see that ls do not outputs them.
Bye,
- --
Steffen Kaiser
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFI5JCL5ThHZhj8SBwRAtYAAJ4lk/MhZ7zSrCDj8uYEgbiK3gvxwQCdFKrI
Rm4tYXOcFQBFAnylMe+mwSc=
=sLCy
-----END PGP SIGNATURE-----
More information about the MIMEDefang
mailing list