# File lib/protocols/smtpserver.rb, line 253
253:                 def process_auth str
254:                         if @state.include?(:auth)
255:                                 send_data "503 auth already issued\r\n"
256:                         elsif str =~ /\APLAIN\s+/i
257:                                 plain = ($'.dup).unpack("m").first # Base64::decode64($'.dup)
258:                                 discard,user,psw = plain.split("\000")
259:                                 if receive_plain_auth user,psw
260:                                         send_data "235 authentication ok\r\n"
261:                                         @state << :auth
262:                                 else
263:                                         send_data "535 invalid authentication\r\n"
264:                                 end
265:                         #elsif str =~ /\ALOGIN\s+/i
266:                         else
267:                                 send_data "504 auth mechanism not available\r\n"
268:                         end
269:                 end