diff --git a/spampd b/spampd
index 7b1f234..2798d50 100644
--- spampd
+++ spampd
@@ -937,6 +937,10 @@ if ( !$options{logsock} ) {
 	};
 }
 
+# untaint some args to prevent errors in other modules
+($pidfile) = ($pidfile =~ /^(.+)$/);
+($relayhost) = ($relayhost =~ /^(.+)$/);
+($relayport) = ($relayport =~ /^(.+)$/);
 
 my $server = bless {
     server => {host => $host,
@@ -1147,10 +1151,10 @@ L<http://www.WorldDesign.com/index.cfm/rd/mta/spampd.htm>.
 
 =head1 Requires
 
-=over 5
-
 Perl modules:
 
+=over 5
+
 =item B<Mail::SpamAssassin>
 
 =item B<Net::Server::PreForkSimple>
@@ -1478,11 +1482,11 @@ Prints usage information.
 
 =head2 Deprecated Options
 
-=over 5
-
 The following options are no longer used but still accepted for backwards
 compatibility with prevoius I<spampd> versions:
 
+=over 5
+
 =item  B<--dead-letters>
 
 =item  B<--heloname>
